[ovs-dev] [PATCH] ofproto-dpif-upcall: Suppress sparse warning.

2014-07-27 Thread Alex Wang
Signed-off-by: Alex Wang --- ofproto/ofproto-dpif-upcall.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index f00c17f..654fbd3 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Suppress sparse warning.

2014-07-27 Thread Alex Wang
sorry for the confusion, please ignore my patch~ On Sun, Jul 27, 2014 at 6:29 PM, Justin Pettit wrote: > Your patch had two fixes, so he should probably grab yours. > > --Justin > > > > On Jul 27, 2014, at 5:37 PM, Ben Pfaff wrote: > > > > Yeah, but I'm happy if Alex wants to push it since I d

[ovs-dev] [PATCH 1/2] connmgr: Fix a typo.

2014-07-29 Thread Alex Wang
Signed-off-by: Alex Wang --- ofproto/connmgr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index b7d5d3b..c6432bf 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1496,7 +1496,7 @@ ofconn_wants_packet_in_on_miss(struct

[ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
connmgr_wants_packet_in_on_miss() is called by multiple threads and thusly should be protected by the mutex. Signed-off-by: Alex Wang --- ofproto/connmgr.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index c6432bf..89af6b6

[ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
The connmgr_wants_packet_in_on_miss() should only check 'ofconn's of type OFCONN_PRIMARY (i.e. controller connections). This commit makes it happen. Signed-off-by: Alex Wang --- ofproto/connmgr.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
the ofctl monitor to simulate controller and capture the packet_ins. So, could you help me clarify if we need consider ofctl conn as a controller connection? Thanks, Alex Wang, On Tue, Jul 29, 2014 at 11:24 AM, Alex Wang wrote: > The connmgr_wants_packet_in_on_miss() should only chec

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
use this fix. Do you think it is okay? Thanks, Alex Wang, On Tue, Jul 29, 2014 at 1:23 PM, Andy Zhou wrote: > Should we also consider lock annotate the ofproto->connmgr variable? > > Also, it seems to me the lock can be per ofproto, instead of a global > lock, but I am not s

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
On Tue, Jul 29, 2014 at 2:16 PM, Andy Zhou wrote: > On Tue, Jul 29, 2014 at 2:09 PM, Alex Wang wrote: > > Thx for the suggestion, I think it will make the connmgr module safer > > if we annotate the ofproto->connmgr. With a quick look, I think it will > > take more ch

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
Thx, pushed both patches to master and branch-2.3. I'll try improving the thread-safety of connmgr module later, On Tue, Jul 29, 2014 at 2:32 PM, Alex Wang wrote: > > > > On Tue, Jul 29, 2014 at 2:16 PM, Andy Zhou wrote: > >> On Tue, Jul 29, 2014 at 2:09 PM, Alex

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
Hey Ben, Sorry for the confusion, On Tue, Jul 29, 2014 at 2:52 PM, Ben Pfaff wrote: > On Tue, Jul 29, 2014 at 11:30:12AM -0700, Alex Wang wrote: > > I think we should not check 'ofconn's for OFCONN_SERVICE... This > > change broke several tests: > > > > *

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
27; to controller, connmgr_wants_packet_in_on_miss() should always returns false, and 'ofctl monitor' should not work. After checking the code further, I think we treat 'ofconn' from 'ovs-ofctl monitor' as 'controller&

[ovs-dev] [PATCH 1/2] bfd: Flip the default value of bfd ip source and destination.

2014-08-08 Thread Alex Wang
This commit flips the default value of bfd ip source and destination, so that they match the default value of ip destination and source of vtep schema. Signed-off-by: Alex Wang --- lib/bfd.c|4 ++-- vswitchd/vswitch.xml |4 ++-- 2 files changed, 4 insertions(+), 4 deletions

[ovs-dev] [PATCH 2/2] bfd: Allow users to set local/remote src/dst MAC address.

2014-08-08 Thread Alex Wang
matching of MAC address on recevied BFD packets. Signed-off-by: Alex Wang --- lib/bfd.c| 60 +++--- vswitchd/vswitch.xml | 32 +++ 2 files changed, 75 insertions(+), 17 deletions(-) diff --git a/lib/bfd.c b/lib/b

[ovs-dev] [PATCH V2] bfd: Allow users to set local/remote src/dst MAC address.

2014-08-11 Thread Alex Wang
This commit adds options for configuring the MAC addresses in BFD state machine. Therein, the "bfd_local_src_mac" and "bfd_local_dst_mac" configure the MAC address of sent BFD packets. The "bfd_remote_dst_mac" configure the matching of MAC address on recevied BFD

[ovs-dev] [dpdk patch 2/8] netdev-dpdk: Add function for getting the socket_id of netdev-dpdk.

2014-08-11 Thread Alex Wang
Signed-off-by: Alex Wang --- lib/netdev-dpdk.c | 14 ++ lib/netdev-dpdk.h |8 2 files changed, 22 insertions(+) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6ee9803..7298334 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1442,6 +1442,20

[ovs-dev] [dpdk patch 5/8] dpif-netdev: Create 'number of dpdk ifaces on cpu socket' pmd threads for each cpu socket.

2014-08-11 Thread Alex Wang
The pmd threads are pinned to available cpu cores on the corresponding cpu socket. Note, core 0 is not pinnable and is reserved for all non-pmd threads. Signed-off-by: Alex Wang --- lib/dpif-netdev.c | 254 + lib/dpif-netdev.h |2 +- lib

[ovs-dev] [dpdk patch 3/8] netdev-dpdk: Make memory pool name contain the socket id.

2014-08-11 Thread Alex Wang
This commit makes the memory pool name contain the socket id. Since dpdk library do not allow creation of memory pool with same name, this commit serves as a simple way of making each name unique. Signed-off-by: Alex Wang Acked-by: Thomas Graf --- lib/netdev-dpdk.c |3 ++- 1 file changed

[ovs-dev] [dpdk patch 7/8] ovs-numa: Add support for cpu-mask configuration.

2014-08-11 Thread Alex Wang
Later patch will use this patch to configure the pmd thread cpu affinity. Signed-off-by: Alex Wang --- lib/ovs-numa.c | 87 lib/ovs-numa.h |7 + 2 files changed, 82 insertions(+), 12 deletions(-) diff --git a/lib/ovs-numa.c b

[ovs-dev] [dpdk patch 6/8] netdev-dpdk: Add function for configuring rx queues for all dpdk interfaces.

2014-08-11 Thread Alex Wang
Later patch will use this function to configure rx queues. Signed-off-by: Alex Wang --- lib/netdev-dpdk.c | 42 +- lib/netdev-dpdk.h |7 +++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c

[ovs-dev] [dpdk patch 0/8] DKDP PMD multithreading.

2014-08-11 Thread Alex Wang
32 udp 64 |32 udp 64-2| | Tx.Load |100|100| | Tx.Saturation| 99.9809428128 | 99.9806658144 | |Tx.DropRate | 0.000304743297568 | 0.000304743297568 | ++---+---+ Alex Wang (8):

[ovs-dev] [dpdk patch 8/8] dpdk: Allow configuration of pmd multithreading and dpdk interface rx queues.

2014-08-11 Thread Alex Wang
nfigurable to help distribution of rx packets among multiple pmd threads. Signed-off-by: Alex Wang --- lib/dpif-linux.c |1 + lib/dpif-netdev.c | 130 ++-- lib/dpif-provider.h|7 +++ lib/dpif.c | 17 +

[ovs-dev] [dpdk patch 4/8] netdev-dpdk: Create 'number of dpdk ifaces on same cpu socket' rx queues and 'number of cpu cores' tx queues for each dpdk interface.

2014-08-11 Thread Alex Wang
on the cpu socket. Also each dpdk interface will have one tx queue for each cpu core, even though not all of those queues will be used. Signed-off-by: Alex Wang --- lib/dpif-netdev.h |1 - lib/netdev-dpdk.c | 55 + 2 files changed, 47

[ovs-dev] [dpdk patch 1/8] ovs-numa: Add ovs-numa.{c, h} for extracting and storing cpu socket and cpu core info.

2014-08-11 Thread Alex Wang
Signed-off-by: Alex Wang --- Changes since first post: - use readdir() for the buffer safety. - only compile ovs-numa.c in linux. - make ovs_numa_get_n_sockets/cores() return *UNSPEC if there is no sockets or cores extracted. - refine code based on Ben's review. - Address review comments

Re: [ovs-dev] [PATCH] learning-switch: Make test-controller work with OpenFlow 1.3+.

2014-08-12 Thread Alex Wang
Looks good to me, Acked-by: Alex Wang On Mon, Aug 4, 2014 at 1:02 PM, Ben Pfaff wrote: > On Wed, Jul 16, 2014 at 03:00:15PM -0700, Ben Pfaff wrote: > > The controller setup in my personal test environment has been broken for > a > > while. I figured that it wasn't any

Re: [ovs-dev] [PATCH] ofp-errors: Use EXT-444 extension error codes for properties in OF1.3.

2014-08-12 Thread Alex Wang
Looks good to me, On Mon, Aug 11, 2014 at 2:36 PM, Ben Pfaff wrote: > These error codes are proposed in the ONF extensibility working group as an > OpenFlow 1.3 extension. > > Error codes are also proposed for the other three "bad property" error > codes, but those already have standardized Ope

Re: [ovs-dev] [dpdk patch 1/8] ovs-numa: Add ovs-numa.{c, h} for extracting and storing cpu socket and cpu core info.

2014-08-13 Thread Alex Wang
Thanks Ben, for the review, > > + > > +/* To avoid sparse warning. */ > > +#ifdef __linux__ > ... > > +#endif /* __linux__ */ > > I didn't see the connection to sparse at first. I'm still not sure > there is one. Maybe a better comment: > /* On non-Linux, these functions are defined inline in

[ovs-dev] [PATCH] ovs-numa: Add ovs-numa.{c, h} for extracting and storing cpu socket and cpu core info.

2014-08-13 Thread Alex Wang
Signed-off-by: Alex Wang --- Changes since first post: - use readdir() for the buffer safety. - only compile ovs-numa.c in linux. - make ovs_numa_get_n_sockets/cores() return *UNSPEC if there is no sockets or cores extracted. - refine code based on Ben's review. - Address review comments

Re: [ovs-dev] [PATCH] ovs-numa: Add ovs-numa.{c, h} for extracting and storing cpu socket and cpu core info.

2014-08-13 Thread Alex Wang
On Wed, Aug 13, 2014 at 12:42 PM, Ben Pfaff wrote: > Acked-by: Ben Pfaff > Thx, applied to master! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ovs-numa: Correct printf format specifiers.

2014-08-13 Thread Alex Wang
Thx for the fix, Acked-by: Alex Wang On Wed, Aug 13, 2014 at 2:19 PM, Ben Pfaff wrote: > list_size() yields a size_t, not uint64_t, and these types are different on > 32-bit targets. > > Signed-off-by: Ben Pfaff > --- > lib/ovs-numa.c |4 ++-- > 1 file change

Re: [ovs-dev] [PATCH V2] bfd: Allow users to set local/remote src/dst MAC address.

2014-08-14 Thread Alex Wang
Thx, applied both patches to master and branch-2.3. On Wed, Aug 13, 2014 at 6:49 PM, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Mon, Aug 11, 2014 at 6:34 PM, Alex Wang wrote: > > This commit adds options for configuring the MAC addresses > > in BFD stat

[ovs-dev] [PATCH] bfd: Clarify the BFD diagnostic.

2014-08-14 Thread Alex Wang
This commit adds more explanation for the bfd diagnostic and bfd remote diagnostic in vswitch and vtep documentation. Requested-by:Bruce Davie Signed-off-by: Alex Wang --- vswitchd/vswitch.xml | 10 ++ vtep/vtep.xml| 10 ++ 2 files changed, 12 insertions(+), 8

Re: [ovs-dev] [PATCH] bfd: Clarify the BFD diagnostic.

2014-08-14 Thread Alex Wang
Thx, applied to master and branch-2.3. On Thu, Aug 14, 2014 at 1:59 PM, Bruce Davie wrote: > Looks good, thanks. > > Bruce > > On Aug 14, 2014, at 11:02 AM, Alex Wang wrote: > > > This commit adds more explanation for the bfd diagnostic and > > bfd remote

[ovs-dev] [PATCH] ofproto-dpif-upcall: Fix use of cleared stack memory.

2014-08-15 Thread Alex Wang
cause ovs abort. This commit fixes the above issue by defining an array of the variable on the function stack. Signed-off-by: Alex Wang --- ofproto/ofproto-dpif-upcall.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ofproto/ofproto-dpif

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix use of cleared stack memory.

2014-08-15 Thread Alex Wang
Thx, applied to master, On Fri, Aug 15, 2014 at 1:33 PM, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > Thanks for taking care of this. > > Ethan > > On Fri, Aug 15, 2014 at 1:15 AM, Alex Wang wrote: > > Commit cc377352d (ofproto: Reorganize in preparation

[ovs-dev] [PATCH] bfd: Clarify bfd:enable.

2014-08-19 Thread Alex Wang
This commit clarifies the documentation for 'bfd:enable' when it is not specified. Signed-off-by: Alex Wang --- vswitchd/vswitch.xml |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index ab738da..6c49250 100644 ---

Re: [ovs-dev] [PATCH] bfd: Clarify bfd:enable.

2014-08-19 Thread Alex Wang
Thx, applied to master and branch-2.3 On Tue, Aug 19, 2014 at 11:52 AM, Ben Pfaff wrote: > On Tue, Aug 19, 2014 at 11:06:04AM -0700, Alex Wang wrote: > > This commit clarifies the documentation for 'bfd:enable' > > when it is not specified. > > > > Signed

[ovs-dev] [PATCH] vswitch.xml: Fix a typo.

2014-08-25 Thread Alex Wang
Signed-off-by: Alex Wang --- vswitchd/vswitch.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 6c49250..42e944b 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -2096,7 +2096,7 @@ default is 00

Re: [ovs-dev] [PATCH] vswitch.xml: Fix a typo.

2014-08-26 Thread Alex Wang
Thx, applied to master and branch-2.3, On Tue, Aug 26, 2014 at 12:26 AM, Justin Pettit wrote: > Acked-by: Justin Pettit > > --Justin > > > On August 25, 2014 at 10:42:24 PM, Alex Wang (al...@nicira.com) wrote: > > Signed-off-by: Alex Wang > > --- > > vs

Re: [ovs-dev] [dpdk patch 2/8] netdev-dpdk: Add function for getting the socket_id of netdev-dpdk.

2014-09-01 Thread Alex Wang
> > > This should be part of netdev_class api rather than dpdk specific API. > we should try to minimize dpdk specific call in dpif-netdev layer. > > One more issue I noticed in this series is that socket and numa is > used interchangeably, can we use just one? > > I'll add it to netdev_class api.

Re: [ovs-dev] [dpdk patch 4/8] netdev-dpdk: Create 'number of dpdk ifaces on same cpu socket' rx queues and 'number of cpu cores' tx queues for each dpdk interface.

2014-09-01 Thread Alex Wang
On Sat, Aug 30, 2014 at 12:02 PM, Pravin Shelar wrote: > On Mon, Aug 11, 2014 at 9:56 PM, Alex Wang wrote: > > Before this commit, ovs only creates one tx/rx queue for each > > dpdk interface and uses only one poll thread for handling the > > I/O of all dpdk interfaces

Re: [ovs-dev] [dpdk patch 5/8] dpif-netdev: Create 'number of dpdk ifaces on cpu socket' pmd threads for each cpu socket.

2014-09-01 Thread Alex Wang
> > > static struct dp_netdev_port *dp_netdev_lookup_port(const struct > dp_netdev *dp, > > @@ -281,6 +281,15 @@ struct dp_netdev_actions > *dp_netdev_flow_get_actions( > > const struct dp_netdev_flow *); > > static void dp_netdev_actions_free(struct dp_netdev_actions *); > > > > +/* Represe

Re: [ovs-dev] [dpdk patch 6/8] netdev-dpdk: Add function for configuring rx queues for all dpdk interfaces.

2014-09-01 Thread Alex Wang
> > > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > > index 012ee68..3013df5 100644 > > --- a/lib/netdev-dpdk.c > > +++ b/lib/netdev-dpdk.c > > @@ -130,6 +130,8 @@ enum { DRAIN_TSC = 20ULL }; > > > > static int rte_eal_init_ret = ENODEV; > > > > +static size_t dpdk_rx_queues OVS_GUARD

Re: [ovs-dev] [dpdk patch 4/8] netdev-dpdk: Create 'number of dpdk ifaces on same cpu socket' rx queues and 'number of cpu cores' tx queues for each dpdk interface.

2014-09-02 Thread Alex Wang
> > > > Generally we should describe subject in less than 70 characters. > > > Commit msg should explain why we are introducing this change. It is > > > not clear from the patch the relation between number of core on socket > > > and rx queues. > > > > > > > > > > Thx, I'll use the 70 characters ru

Re: [ovs-dev] [PATCH] vtep: additions to BFD configuration and status reporting

2014-09-02 Thread Alex Wang
On Tue, Sep 2, 2014 at 11:27 AM, wrote: > It also brings the usage > of the BFD diagnostic keys into line with the recent clarifications > made for OVS. > Does this commit miss this part? did not see any change/line move related to diagnostic, ___ dev

Re: [ovs-dev] [dpdk patch 3/8] netdev-dpdk: Make memory pool name contain the socket id.

2014-09-02 Thread Alex Wang
Thx, applied this to master. On Sat, Aug 30, 2014 at 12:01 PM, Pravin Shelar wrote: > On Mon, Aug 11, 2014 at 9:56 PM, Alex Wang wrote: > > This commit makes the memory pool name contain the socket id. > > Since dpdk library do not allow creation of memory pool with > > s

[ovs-dev] [PATCH 2/2] dpif-netdev: Introduce port_try_ref() to prevent a race.

2014-09-02 Thread Alex Wang
rt_try_ref() which uses ovs_refcount_try_ref_rcu(). And the pmd thread will only load the port's queue, if port_try_ref() returns true. Found by inspection. Signed-off-by: Alex Wang --- lib/dpif-netdev.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff -

[ovs-dev] [PATCH 1/2] netdev-dpdk: Show interface status for dpdk0.

2014-09-02 Thread Alex Wang
This commit fixes a bug which prevents the display of interface status for dpdk0. Found by inspection. Signed-off-by: Alex Wang --- lib/netdev-dpdk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 049ea5e..a4ed355 100644 --- a

Re: [ovs-dev] [PATCH 2/2] dpif-netdev: Introduce port_try_ref() to prevent a race.

2014-09-02 Thread Alex Wang
> > > @@ -1864,7 +1874,10 @@ pmd_load_queues(struct pmd_thread *f, > > index = 0; > > > > CMAP_FOR_EACH (port, node, &f->dp->ports) { > > -if (netdev_is_pmd(port->netdev)) { > > +/* Calls port_try_ref() to prevent the main thread > > + * from deleting the port. */

Re: [ovs-dev] [PATCH 1/2] netdev-dpdk: Show interface status for dpdk0.

2014-09-02 Thread Alex Wang
Thx, applied to master On Tue, Sep 2, 2014 at 7:27 PM, Pravin Shelar wrote: > On Tue, Sep 2, 2014 at 6:44 PM, Alex Wang wrote: > > This commit fixes a bug which prevents the display of interface > > status for dpdk0. > > > > Found by inspection. > > > >

Re: [ovs-dev] [PATCH 2/2] dpif-netdev: Introduce port_try_ref() to prevent a race.

2014-09-03 Thread Alex Wang
index++; } -index++; } +/* Unrefs the port_try_ref(). */ +port_unref(port); } Will apply to master soon, On Tue, Sep 2, 2014 at 9:39 PM, Alex Wang wrote: > > @@ -1864,7 +1874,10 @@ pmd_load_queues(struct pmd_thread *

[ovs-dev] [PATCH 1/2] ovs-numa: Relax the ovs_numa_*() input argument check.

2014-09-04 Thread Alex Wang
Many of the ovs_numa_*() functions abort the program when the input cpu socket or core id is invalid. This commit relaxes the input check and makes these functions return OVS_*_UNSPEC when the check fails. Signed-off-by: Alex Wang --- lib/ovs-numa.c | 77

[ovs-dev] [PATCH 2/2] ovs-numa: Add function for getting cpu socket id from core id.

2014-09-04 Thread Alex Wang
Signed-off-by: Alex Wang --- lib/ovs-numa.c | 18 ++ lib/ovs-numa.h |7 +++ 2 files changed, 25 insertions(+) diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index 545b075..2de2aa2 100644 --- a/lib/ovs-numa.c +++ b/lib/ovs-numa.c @@ -168,6 +168,24 @@ ovs_numa_get_n_cores

[ovs-dev] [PATCH] ovs-numa: Add module description.

2014-09-04 Thread Alex Wang
Add a short description of the module and its assumption. Signed-off-by: Alex Wang --- lib/ovs-numa.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index 2de2aa2..ad44d95 100644 --- a/lib/ovs-numa.c +++ b/lib/ovs-numa.c @@ -36,6 +36,18

Re: [ovs-dev] [PATCH] ovs-numa: Add module description.

2014-09-04 Thread Alex Wang
Thx for the clarification, I'll replace the 'socket' with 'numa' and repost the series. On Thu, Sep 4, 2014 at 1:32 PM, Pravin Shelar wrote: > On Thu, Sep 4, 2014 at 1:26 PM, Alex Wang wrote: > > Add a short description of the module and its assumption

[ovs-dev] [PATCH 1/4] ovs-numa: Replace name 'cpu_socket' with 'numa_node'.

2014-09-04 Thread Alex Wang
'numa' and 'socket' are currently used interchangeably in ovs-numa. But they are not always equivalent as some platform can have multiple sockets on a numa node. To avoid confusion, this commit renames all the 'cpu_socket' to 'numa_node'. Signed-off-b

[ovs-dev] [PATCH 2/4] ovs-numa: Relax the ovs_numa_*() input argument check.

2014-09-04 Thread Alex Wang
Many of the ovs_numa_*() functions abort the program when the input cpu socket or core id is invalid. This commit relaxes the input check and makes these functions return OVS_*_UNSPEC when the check fails. Signed-off-by: Alex Wang --- lib/ovs-numa.c | 77

[ovs-dev] [PATCH 4/4] ovs-numa: Add module description.

2014-09-04 Thread Alex Wang
Add a short description of the module and its assumption. Signed-off-by: Alex Wang --- lib/ovs-numa.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index 4698967..c909d5a 100644 --- a/lib/ovs-numa.c +++ b/lib/ovs-numa.c @@ -36,6 +36,18

[ovs-dev] [PATCH 3/4] ovs-numa: Add function for getting numa node id from core id.

2014-09-04 Thread Alex Wang
Signed-off-by: Alex Wang --- lib/ovs-numa.c | 17 + lib/ovs-numa.h |7 +++ 2 files changed, 24 insertions(+) diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index bcdea3b..4698967 100644 --- a/lib/ovs-numa.c +++ b/lib/ovs-numa.c @@ -168,6 +168,23 @@ ovs_numa_get_n_cores

Re: [ovs-dev] [PATCH 2/4] ovs-numa: Relax the ovs_numa_*() input argument check.

2014-09-05 Thread Alex Wang
Thx for pointing it out, I'll make a note in the comment. On Fri, Sep 5, 2014 at 2:19 PM, Pravin Shelar wrote: > On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > > Many of the ovs_numa_*() functions abort the program when the > > input cpu socket or core id is invalid.

Re: [ovs-dev] [PATCH 4/4] ovs-numa: Add module description.

2014-09-05 Thread Alex Wang
Thanks, applied all to master On Fri, Sep 5, 2014 at 2:20 PM, Pravin Shelar wrote: > On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > > Add a short description of the module and its assumption. > > > > Signed-off-by: Alex Wang > > > LG

[ovs-dev] [PATCH] ovs-numa: Fix a missing initialization.

2014-09-08 Thread Alex Wang
This commit updates the pointer to 'struct numa_node' when initializing the 'struct cpu_core'. Signed-off-by: Alex Wang --- lib/ovs-numa.c |1 + 1 file changed, 1 insertion(+) diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index 4f0ba0d..7da1407 100644 --- a/lib/ovs-

[ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a free of uninitialized memory.

2014-09-08 Thread Alex Wang
mmit fixes the issue by making 'upcall_receive()' always initialize the 'upcall->put_actions'. Found by inspection. Signed-off-by: Alex Wang --- ofproto/ofproto-dpif-upcall.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif-u

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a free of uninitialized memory.

2014-09-08 Thread Alex Wang
Thx Ben, > It's a little unusual for an initialization function that fails to > still leave the object that it initializes ready to be destroyed. If > upcall_receive() fails, is there other data in 'upcall' that needs to > be destroyed? No, I don't think there is other data to be destroyed..

[ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a free of uninitialized memory.

2014-09-08 Thread Alex Wang
ommit fixes the issue by making the caller not conduct the uninitialize of the 'upcall' when there is error. Found by inspection. Signed-off-by: Alex Wang --- PATCH -> V2: 1. make the caller just return the error. 2. fix the comment to warn the user. --- ofproto/ofproto-dpif-up

[ovs-dev] [dpdk patch v2 6/6] dpif-netdev: Create multiple pmd threads by default.

2014-09-08 Thread Alex Wang
ad' for NON_PMD_CORE_ID. - the received packet processing functions are refactored to use 'struct dp_netdev_pmd_thread' as input. - the 'netdev_send()' function will be called with the proper queue id. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase

[ovs-dev] [dpdk patch v2 4/6] netdev-dpdk: Add indicator for flushing tx queue.

2014-09-08 Thread Alex Wang
x27; which is set if the queue is to be used by a non-local pmd thread. Then, when enqueueing the tx pkts, if the flag is set, the tx queue will always be flushed immediately after the enqueue. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. --- lib/netdev-dpdk.c |

[ovs-dev] [dpdk patch v2 3/6] netdev-dpdk: Create multiple tx/rx queues by default.

2014-09-08 Thread Alex Wang
will be used, each poll thread will have its own queue for transmission on the dpdk interface. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. --- lib/dpif-netdev.h |1 - lib/netdev-dpdk.c | 54 - 2 files changed,

[ovs-dev] [dpdk patch v2 2/6] netdev: Add n_txq to 'struct netdev'.

2014-09-08 Thread Alex Wang
ues is not supported. Upcomping patches will start using it and create multiple tx queues for dpdk netdev by default. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. --- lib/dpif-netdev.c |2 +- lib/dpif-netdev.h |2 ++ lib/netdev-bsd.c |6 ++

[ovs-dev] [dpdk patch v2 5/6] netdev-dpdk: Remove the tx queue spinlock.

2014-09-08 Thread Alex Wang
er needed. And this commit removes it from 'struct dpdk_tx_queue'. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. --- lib/netdev-dpdk.c |6 -- 1 file changed, 6 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index d6bf0bd..26b15

[ovs-dev] [dpdk patch v2 1/6] netdev: Add function for getting the numa node id of netdev.

2014-09-08 Thread Alex Wang
This commit adds a new API to the 'struct netdev_class' which allows user to query the numa node id the 'netdev' is on. Currently, only netdev-dpdk module implements this function. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. --- lib/netdev-b

Re: [ovs-dev] [PATCH] ovs-numa: Fix a missing initialization.

2014-09-08 Thread Alex Wang
Thx, applied to master, On Mon, Sep 8, 2014 at 10:52 AM, Ben Pfaff wrote: > On Mon, Sep 08, 2014 at 08:29:22AM -0700, Alex Wang wrote: > > This commit updates the pointer to 'struct numa_node' > > when initializing the 'struct cpu_core'. > > > > Si

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a free of uninitialized memory.

2014-09-08 Thread Alex Wang
Thx, applied to master, On Mon, Sep 8, 2014 at 11:18 AM, Ben Pfaff wrote: > On Mon, Sep 08, 2014 at 11:13:34AM -0700, Alex Wang wrote: > > On current master, when 'upcall_receive()' returns error, the > > ofpbuf 'upcall->put_actions' is uninitialized

[ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-09 Thread Alex Wang
run, there will be a refactor of the use of ovs-rcu module, in which all callback events only free the old version of objects. Signed-off-by: Alex Wang --- lib/ovs-rcu.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c index a052d6c..6fe6

[ovs-dev] [dpdk patch v3 1/6] netdev: Add function for getting the numa node id of netdev.

2014-09-09 Thread Alex Wang
This commit adds a new API to the 'struct netdev_class' which allows user to query the numa node id the 'netdev' is on. Currently, only netdev-dpdk module implements this function. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. V2 -> V3:

[ovs-dev] [dpdk patch v3 2/6] netdev: Add n_txq to 'struct netdev'.

2014-09-09 Thread Alex Wang
ues is not supported. Upcomping patches will start using it and create multiple tx queues for dpdk netdev by default. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. V2 -> V3: - rebase. --- lib/dpif-netdev.c |2 +- lib/dpif-netdev.h |2 ++ lib/netdev-bsd

[ovs-dev] [dpdk patch v3 3/6] netdev-dpdk: Create multiple tx/rx queues by default.

2014-09-09 Thread Alex Wang
will be used, each poll thread will have its own queue for transmission on the dpdk interface. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. V2 -> V3: - rebase. --- lib/dpif-netdev.h |1 - lib/netdev-dpdk.c

[ovs-dev] [dpdk patch v3 5/6] netdev-dpdk: Remove the tx queue spinlock.

2014-09-09 Thread Alex Wang
er needed. And this commit removes it from 'struct dpdk_tx_queue'. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. V2 -> V3: - rebase. --- lib/netdev-dpdk.c |6 -- 1 file changed, 6 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-

[ovs-dev] [dpdk patch v3 4/6] netdev-dpdk: Add indicator for flushing tx queue.

2014-09-09 Thread Alex Wang
x27; which is set if the queue is to be used by a non-local pmd thread. Then, when enqueueing the tx pkts, if the flag is set, the tx queue will always be flushed immediately after the enqueue. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refactor the code. V2 -> V3: - rebase. ---

[ovs-dev] [dpdk patch v3 6/6] dpif-netdev: Create multiple pmd threads by default.

2014-09-09 Thread Alex Wang
ad' for NON_PMD_CORE_ID. - the received packet processing functions are refactored to use 'struct dp_netdev_pmd_thread' as input. - the 'netdev_send()' function will be called with the proper queue id. Signed-off-by: Alex Wang --- PATCH -> V2 - rebase and refacto

[ovs-dev] [PATCH 3/4] ovs-appctl: Add option '--option' to show all long options.

2014-09-10 Thread Alex Wang
Signed-off-by: Alex Wang --- utilities/ovs-appctl.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index bb17ec2..8249bf8 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -81,6 +81,19 @@ main(int argc

[ovs-dev] [PATCH 2/4] ovs-appctl: Make command description all lowercase.

2014-09-10 Thread Alex Wang
Signed-off-by: Alex Wang --- lib/dpif-netdev.c |4 ++-- lib/netdev-dummy.c |2 +- lib/timeval.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 072ed5d..a4dabb6 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif

[ovs-dev] [PATCH 1/4] ovsdb-server: Remove the 'enable-dummy' option.

2014-09-10 Thread Alex Wang
There is no use case of this option in ovsdb-server. Also, it causes dpif-dummy and netdev-dummy module register unrelated unixctl commands. Signed-off-by: Alex Wang --- ovsdb/ovsdb-server.c |7 --- tests/ovsdb-server.at |2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff

[ovs-dev] [PATCH 4/4] ovs-appctl: Remove the include of vlog.h.

2014-09-10 Thread Alex Wang
Remove the include of vlog.h and all the related macros, since it is not really used. Signed-off-by: Alex Wang --- utilities/ovs-appctl.c |7 --- 1 file changed, 7 deletions(-) diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index 8249bf8..174d147 100644 --- a/utilities

[ovs-dev] [PATCH 1/3] ovsdb-server: Remove the 'enable-dummy' option.

2014-09-10 Thread Alex Wang
There is no use case of this option in ovsdb-server. Also, it causes dpif-dummy and netdev-dummy module register unrelated unixctl commands. Signed-off-by: Alex Wang --- ovsdb/ovsdb-server.c |7 --- tests/ovsdb-server.at |2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff

[ovs-dev] [PATCH 2/3] unixctl: Make command description all lowercase.

2014-09-10 Thread Alex Wang
Signed-off-by: Alex Wang --- lib/dpif-netdev.c |4 ++-- lib/netdev-dummy.c |2 +- lib/timeval.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 072ed5d..a4dabb6 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif

[ovs-dev] [PATCH 3/3] ovs-appctl: Add option '--option' to show all long options.

2014-09-10 Thread Alex Wang
Signed-off-by: Alex Wang --- utilities/ovs-appctl.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index bb17ec2..f279f50 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -81,6 +81,19 @@ main(int argc

Re: [ovs-dev] [PATCH 4/4] ovs-appctl: Remove the include of vlog.h.

2014-09-10 Thread Alex Wang
Just realized that I mistakenly sent this series (not ready) out. Please ignore, I have sent the new version (3 patches instead of 4) without adding a version number... sorry, On Wed, Sep 10, 2014 at 12:52 PM, Alex Wang wrote: > Remove the include of vlog.h and all the related macros, si

Re: [ovs-dev] [PATCH 3/3] ovs-appctl: Add option '--option' to show all long options.

2014-09-11 Thread Alex Wang
ote: > On Wed, Sep 10, 2014 at 02:12:31PM -0700, Alex Wang wrote: > > Signed-off-by: Alex Wang > > What's it for? > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 3/3] ovs-appctl: Add option '--option' to show all long options.

2014-09-11 Thread Alex Wang
Thx Ben, I'll adjust the commit message, Also, i think it makes sense to generalize into a function in command-line module. Alex Wang, On Thu, Sep 11, 2014 at 11:03 AM, Ben Pfaff wrote: > Can you add that to the commit message? > > Does it make any sense to generalize this

Re: [ovs-dev] [PATCH 1/3] ovsdb-server: Remove the 'enable-dummy' option.

2014-09-11 Thread Alex Wang
Thx, applied to master, On Thu, Sep 11, 2014 at 10:45 AM, Ben Pfaff wrote: > On Wed, Sep 10, 2014 at 02:12:29PM -0700, Alex Wang wrote: > > There is no use case of this option in ovsdb-server. Also, > > it causes dpif-dummy and netdev-dummy module register unrelated >

[ovs-dev] [PATCH] command-line: Add function to print all options.

2014-09-11 Thread Alex Wang
command. Signed-off-by: Alex Wang --- lib/command-line.c | 23 +++ lib/command-line.h |1 + utilities/ovs-appctl.c | 18 ++ 3 files changed, 42 insertions(+) diff --git a/lib/command-line.c b/lib/command-line.c index cb73a25..820f3ff 100644 --- a

Re: [ovs-dev] [dpdk patch v3 6/6] dpif-netdev: Create multiple pmd threads by default.

2014-09-11 Thread Alex Wang
the pkt immediately (via calling dpif_netdev_execute()). On Thu, Sep 11, 2014 at 10:39 PM, Pravin Shelar wrote: > On Tue, Sep 9, 2014 at 5:00 PM, Alex Wang wrote: > > With this commit, ovs by default will try creating 'number of > > dpdk interfaces on numa node' pmd t

Re: [ovs-dev] [dpdk patch v3 3/6] netdev-dpdk: Create multiple tx/rx queues by default.

2014-09-11 Thread Alex Wang
> > > > > Specifically, the default number of rx queues will be the number > > of dpdk interfaces on the numa node. And the upcoming work > > will assign each rx queue to a different poll thread. The default > > number of tx queues will be the number of cpu cores on the machine. > > Although not

Re: [ovs-dev] [dpdk patch v3 3/6] netdev-dpdk: Create multiple tx/rx queues by default.

2014-09-11 Thread Alex Wang
;, not for specifying the number of queues. On Thu, Sep 11, 2014 at 11:22 PM, Pravin Shelar wrote: > On Thu, Sep 11, 2014 at 10:56 PM, Alex Wang wrote: > >> > > >> > Specifically, the default number of rx queues will be the number > >> > of dpdk interfaces on

[ovs-dev] [RFC ovs-appctl compgen] ovs-appctl: Add bash command-line completion script.

2014-09-12 Thread Alex Wang
etion.d/ or manually run it via . ovs-appctl-compgen.bash. Also, a unit testsuite is provided as ovs-appctl-compgen-test.bash. It is suggested that this testsuit be run inside ovs-sandbox. Signed-off-by: Alex Wang --- utilities/ovs-appctl-compgen-test.bash | 586 +++

Re: [ovs-dev] [RFC ovs-appctl compgen] ovs-appctl: Add bash command-line completion script.

2014-09-12 Thread Alex Wang
depends on this patch: http://openvswitch.org/pipermail/dev/2014-September/045617.html On Fri, Sep 12, 2014 at 12:14 AM, Alex Wang wrote: > This patch is a RFC for the bash command-line completion script > for ovs-appctl command. Right now, the script can do the following: > > -

Re: [ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-12 Thread Alex Wang
, Sep 09, 2014 at 11:23:34AM -0700, Alex Wang wrote: > > On current master, the per-thread callback event set is flushed > > when ovsrcu_quiesce_start() is called or when the callback > > event set is full. For threads that only call 'ovsrcu_quiesce()' > > to ind

Re: [ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-12 Thread Alex Wang
Applied to master with the changes mentioned in previous email. Thanks, On Fri, Sep 12, 2014 at 10:18 AM, Alex Wang wrote: > Thx for pointing it out! > > Actually, I did 'perthread = pthread_getspecific(perthread_key);' instead > of > using 'ovsrcu_perthread_get

Re: [ovs-dev] [dpdk patch v3 2/6] netdev: Add n_txq to 'struct netdev'.

2014-09-12 Thread Alex Wang
Applied the first two patches to master. Will rebase the following ones based on the discussion and comments. On Thu, Sep 11, 2014 at 10:38 PM, Pravin Shelar wrote: > On Tue, Sep 9, 2014 at 5:00 PM, Alex Wang wrote: > > This commit adds new variable n_txq to 'struct netdev&

[ovs-dev] [dpdk patch v4 1/5] netdev: Add function for configuring tx and rx queues.

2014-09-12 Thread Alex Wang
dule implements this function. Signed-off-by: Alex Wang --- PATCH -> V4: - move this hidden patch forward. --- lib/netdev-bsd.c |1 + lib/netdev-dpdk.c | 46 +- lib/netdev-dummy.c|1 + lib/netdev-linux.c|1 + lib/n

  1   2   3   4   5   6   7   8   9   10   >