Daniele Di Proietto <diproiet...@vmware.com> writes:

> There's a lot of code in netdev-dpdk which is not at all related to the
> netdev interface, mostly the library initialization code.
>
> This commit moves it to a new 'dpdk' module, to simplify 'netdev-dpdk'.
>
> Also a new module 'dpdk-stub' is introduced to implement some functions
> when DPDK is not available.  This replaces the old 'netdev-nodpdk'
> module.
>
> Some redundant includes are removed or reorganized as a consequence.
>
> No functional change.
>
> CC: Aaron Conole <acon...@redhat.com>
> Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
> ---

First - thanks for this.  I like everything about 1-12/13.

You have my ACK for the first 12 of the series (and my Tested-by: as
well - though I have only tested --with-dpdk).

Just one thing...

> diff --git a/lib/netdev-nodpdk.c b/lib/dpdk-stub.c
> similarity index 84%
> rename from lib/netdev-nodpdk.c
> rename to lib/dpdk-stub.c
> index 45564d2..42196c4 100644
> --- a/lib/netdev-nodpdk.c
> +++ b/lib/dpdk-stub.c
> @@ -1,4 +1,5 @@
>  /*
> + * Copyright (c) 2014, 2015, 2016 Nicira, Inc.
>   * Copyright (c) 2016 Red Hat, Inc.
>   *
>   * Licensed under the Apache License, Version 2.0 (the "License");
> @@ -15,7 +16,8 @@
>   */
>  
>  #include <config.h>
> -#include "netdev-dpdk.h"
> +#include "dpdk.h"
> +
>  #include "smap.h"
>  #include "ovs-thread.h"
>  #include "openvswitch/vlog.h"
> @@ -34,3 +36,16 @@ dpdk_init(const struct smap *ovs_other_config)
>          ovsthread_once_done(&once);
>      }
>  }
> +
> +void
> +dpdk_set_lcore_id(unsigned cpu OVS_UNUSED)
> +{
> +    /* Nothing */
> +}
> +
> +const char *
> +dpdk_get_vhost_sock_dir(void)
> +{
> +    return NULL;
> +}
> +

When applying, I get one warning from git here, for introducing this
newline.

   Applying: dpdk: New module with some code from netdev-dpdk.
   .git/rebase-apply/patch:132: new blank line at EOF.
   +
   warning: 1 line adds whitespace errors.

Just thought I'd point it out.  ;-)  It can probably be either ignored
or fixed when applying to master.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to