Re: [ovs-dev] [PATCH 2/2] lib: Determine cpu core count with /proc/cpuinfo

2013-12-09 Thread Ethan Jackson
I've folded in the following incremental which causes us to only do the core calculation once since it looks so expensive. I think this is fine for now, and I intended to merge it, but I think we should revisit the assembler instruction. It's probably cleaner, and would support platforms like Wind

[ovs-dev] [PATCH v6 1/2] dpif-netdev: Properly create exact match masks.

2013-12-09 Thread Jarno Rajahalme
Normally OVS userspace supplies a mask along with a flow key for each new data path flow that should be created. OVS also provides an option to disable the kernel wildcarding, in which case the flows are created without a mask. When kernel wildcarding is disabled, the datapath should use exact ma

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Alexander Wu
On 10/12/2013 04:50, Jarno Rajahalme wrote: On Dec 8, 2013, at 7:34 PM, Alexander Wu wrote: Hi Jarno, I get my gcc predefined __core2. But its performance seems to be worse when I add '-O2'. Not sure if it's the reality. From the numbers below it seems that performance is better with -O2

Re: [ovs-dev] [PATCH V2] bfd: Change the update of forwarding flag.

2013-12-09 Thread Alex Wang
The only thing is I didn't follow is: """ Do we really still need the bfd_forwarding_if_rx_update() function? It's so short and only called in this one place, could we just move it's code there? """ Since there are two other places where bfd_forwarding_if_rx_update() are called, and I think they

[ovs-dev] [PATCH V2] bfd: Change the update of forwarding flag.

2013-12-09 Thread Alex Wang
Currently, we update the forwarding flag in bfd_set_state() and in bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is enabled. However, these are not the exact places where the forwarding flag needs to be updated. The exact places are in the bfd_process_packet() where bfd status are changed

[ovs-dev] [PATCH] socket-util: Remove unused functions.

2013-12-09 Thread Ben Pfaff
A Windows porter mentioned to me that these functions caused special trouble in the Windows port. However, they are no longer used, so we might as well remove them. Signed-off-by: Ben Pfaff --- lib/socket-util.c | 254 - lib/socket-util.h |

Re: [ovs-dev] [PATCH v5 4/4] Classifier: Track address prefixes.

2013-12-09 Thread Ben Pfaff
On Mon, Dec 09, 2013 at 03:52:39PM -0800, Jarno Rajahalme wrote: > On Dec 7, 2013, at 2:04 PM, Ben Pfaff wrote: > > On Thu, Dec 05, 2013 at 04:27:26PM -0800, Jarno Rajahalme wrote: > >> Add a prefix tree (trie) structure for tracking the used address > >> space, enabling skipping classifier tables

Re: [ovs-dev] [PATCH v5 4/4] Classifier: Track address prefixes.

2013-12-09 Thread Jarno Rajahalme
On Dec 7, 2013, at 2:04 PM, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:27:26PM -0800, Jarno Rajahalme wrote: >> Add a prefix tree (trie) structure for tracking the used address >> space, enabling skipping classifier tables containing longer masks >> than necessary for an address field value i

Re: [ovs-dev] [PATCH 2/2] bfd: Change the update of forwarding flag.

2013-12-09 Thread Alex Wang
Thanks Ethan for the comments, I'll adjust accordingly, On Mon, Dec 9, 2013 at 3:38 PM, Ethan Jackson wrote: > On Mon, Dec 9, 2013 at 1:40 PM, Alex Wang wrote: > > Currently, we updates the forwarding flag in bfd_set_state() and > > in bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is e

Re: [ovs-dev] [PATCH 1/2] bfd: Change the update of forwarding_if_rx_detect_time.

2013-12-09 Thread Ethan Jackson
k sounds good. Ethan On Mon, Dec 9, 2013 at 3:21 PM, Alex Wang wrote: > okay, this makes sense. we could drop this patch. > > > On Mon, Dec 9, 2013 at 3:18 PM, Ethan Jackson wrote: >> >> Doesn't the next patch essentially resolve this issue by making the >> forwarding_if_rx calculation more re

Re: [ovs-dev] [PATCH 2/2] bfd: Change the update of forwarding flag.

2013-12-09 Thread Ethan Jackson
On Mon, Dec 9, 2013 at 1:40 PM, Alex Wang wrote: > Currently, we updates the forwarding flag in bfd_set_state() and > in bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is enabled. > However, these are not the exact places where the forwarding flag > needs to be updated. The exact places ar

Re: [ovs-dev] [PATCH 1/2] bfd: Change the update of forwarding_if_rx_detect_time.

2013-12-09 Thread Alex Wang
okay, this makes sense. we could drop this patch. On Mon, Dec 9, 2013 at 3:18 PM, Ethan Jackson wrote: > Doesn't the next patch essentially resolve this issue by making the > forwarding_if_rx calculation more responsive? With the new threaded > put stuff that's coming, we can more or less gua

Re: [ovs-dev] [PATCH 1/2] bfd: Change the update of forwarding_if_rx_detect_time.

2013-12-09 Thread Ethan Jackson
Doesn't the next patch essentially resolve this issue by making the forwarding_if_rx calculation more responsive? With the new threaded put stuff that's coming, we can more or less guarantee that stats will be updated at worst once every 1.5 seconds which makes me think that 3000 seconds is overki

[ovs-dev] [PATCH 2/2] bfd: Change the update of forwarding flag.

2013-12-09 Thread Alex Wang
Currently, we updates the forwarding flag in bfd_set_state() and in bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is enabled. However, these are not the exact places where the forwarding flag needs to be updated. The exact places are in the bfd_process_packet() where bfd status are changed

[ovs-dev] [PATCH 1/2] bfd: Change the update of forwarding_if_rx_detect_time.

2013-12-09 Thread Alex Wang
Currently, the ovs updates the rx_packet counter approximately every 2000 ms. If there is rx_packet and forwarding_if_rx is enabled, the forwarding_if_rx_detect_time will be incremented by 2000 ms. And as long as forwarding_if_rx_detect_time is greater than current time, the forwarding flag value

Re: [ovs-dev] new "sparse" warning

2013-12-09 Thread Jarno Rajahalme
Acked-by: Jarno Rajahalme On Dec 7, 2013, at 10:48 AM, Ben Pfaff wrote: > Building with GCC 4.7 without __corei7: > >../lib/util.c:921:15: warning: symbol 'count_1bits_8' was not declared. > Should it be static? > > Here is one possible fix, but perhaps you prefer a different one. > > d

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Jarno Rajahalme
On Dec 8, 2013, at 7:34 PM, Alexander Wu wrote: > Hi Jarno, > > I get my gcc predefined __core2. But its performance seems to be worse when > I add '-O2'. Not sure if it's the reality. > >From the numbers below it seems that performance is better with -O2 (1063893 < >1317450), so I’m not sur

Re: [ovs-dev] [PATCH] lib: Bypass include_next preprocessor directives on Windows platform

2013-12-09 Thread Alin Serdean
I would leave it up too you. An easier solution would be to put in the Vstudio includes first(in the case for cccl) because there is no need for the string.h wrapper. Kind Regards, Alin. From: Ben Pfaff [b...@nicira.com] Sent: Friday, December 06, 2013 10

Re: [ovs-dev] [PATCH v2] openvswitch: Use libtool and allow building shared libs

2013-12-09 Thread Helmut Schaa
Ben Pfaff schrieb: >On Mon, Dec 09, 2013 at 10:32:06AM +0100, Helmut Schaa wrote: >> Currently openvswitch builds all libraries static only. However, >> libopenvswitch is linked into nearly all openvswitch executables >> making it hardly possible to run openvswitch on embedded devices >> (for

Re: [ovs-dev] [PATCH v2] openvswitch: Use libtool and allow building shared libs

2013-12-09 Thread Ben Pfaff
On Mon, Dec 09, 2013 at 10:32:06AM +0100, Helmut Schaa wrote: > Currently openvswitch builds all libraries static only. However, > libopenvswitch is linked into nearly all openvswitch executables > making it hardly possible to run openvswitch on embedded devices > (for example running OpenWrt). >

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Ben Pfaff
On Mon, Dec 09, 2013 at 09:26:08AM +0100, Helmut Schaa wrote: > On Mon, Dec 9, 2013 at 9:12 AM, Helmut Schaa > wrote: > > On Fri, Dec 6, 2013 at 7:58 PM, Ben Pfaff wrote: > >> I think that your binaries must include debug symbols. I don't know why > >> you would include debug symbols in binaries

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Ben Pfaff
On Mon, Dec 09, 2013 at 09:12:44AM +0100, Helmut Schaa wrote: > On Fri, Dec 6, 2013 at 7:58 PM, Ben Pfaff wrote: > > On Wed, Nov 27, 2013 at 10:35:39AM +0100, Helmut Schaa wrote: > >> 7.5M./sbin/ovs-vswitchd > > > I think that your binaries must include debug symbols. I don't know why > > you

[ovs-dev] [PATCH 1/3] lib: Add ipv6 support for active and passive socket connections

2013-12-09 Thread Arun Sharma
Allows all socket operations to use ipv6 network addresses, except in-band control which is not supported for ipv6 Signed-off-by: Nandan Nivgune Signed-off-by: Abhijit Bhopatkar Signed-off-by: Arun Sharma --- lib/packets.h| 12 +++ lib/rconn.c | 39 ++-

[ovs-dev] [PATCH 3/3] man: Update manpages for IPv6 socket connections.

2013-12-09 Thread Arun Sharma
Signed-off-by: Nandan Nivgune Signed-off-by: Abhijit Bhopatkar Signed-off-by: Arun Sharma --- lib/vconn-active.man |6 +++--- lib/vconn-passive.man| 10 ++ ovsdb/remote-active.man |9 + ovsdb/remote-passive.man | 13 - 4 files changed, 22 inserti

[ovs-dev] [PATCH 2/3] tests: Add tests for socket connections over IPv6.

2013-12-09 Thread Arun Sharma
Also added tests for NetFlow and sFlow using IPv6 sockets. Signed-off-by: Nandan Nivgune Signed-off-by: Abhijit Bhopatkar Signed-off-by: Arun Sharma --- tests/ofproto-dpif.at | 872 --- tests/ofproto-macros.at | 17 + tests/ovs-vsctl.at |

[ovs-dev] [PATCH v4.3 3/5] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-12-09 Thread Alexander Wu
v4.3: Rollback table id 255 to 253 according to OpenFlow spec and current implement Update AT. v4.2: Fix last table features id to 255. Add more comments. Fix wrong print of last table feature. v4: 1. Delete duplication code. 2. Add new acts in *.def. 3. Update abstract table-feat

[ovs-dev] [PATCH v4.3 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Alexander Wu
v4.1: Update bitmap_count1 function: call count_1bits to improve performance. v4: Add bitmap_count1 function to count all 1 bits. --- lib/bitmap.c | 15 +++ lib/bitmap.h |1 + 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index

[ovs-dev] [PATCH v4.3 1/5] ofp-actions: Complete ofp13_action_type and add function to use instructions.

2013-12-09 Thread Alexander Wu
v4: Add enums of ofp13_action_type and make them work. v3: Add func to get instruction/action name by OpenFlow instruction type directly. --- include/openflow/openflow-1.3.h | 20 ++-- lib/ofp-actions.c | 19 +++ lib/ofp-actions.h

[ovs-dev] [PATCH v4.3 4/5] ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle.

2013-12-09 Thread Alexander Wu
v4.3: Fix last table features id to 253 according to current imlement and OpenFlow spec. v4.2: Fix last table features id to 255. v4: 1. update abstract table-features to bitmap 2. update ofproto, reduce copy when reply table features. 3. Move max_table_feature to oftable. v3: 1. D

[ovs-dev] [PATCH v4.3 5/5] ofctl: Add ovs-ofctl dump-table-features.

2013-12-09 Thread Alexander Wu
v4: No change. v3: No change. v2: No change v1: Now the cli we implement is very crude. Maybe it could display better. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- utilities/ovs-ofctl.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff -

[ovs-dev] [PATCH v4.3 0/5] Implement OFPMP_TABLE_FEATURES GET

2013-12-09 Thread Alexander Wu
v4.3: Fix last table faetures id to 253 according to current implement and OpenFlow specs. Update table features AT. v4.2: Fix last table features id to 255. Fix wrong prints of last table features. Add more comments to describe the implement inner ovs: The bitmaps stores table fea

[ovs-dev] [PATCH v2] openvswitch: Use libtool and allow building shared libs

2013-12-09 Thread Helmut Schaa
Currently openvswitch builds all libraries static only. However, libopenvswitch is linked into nearly all openvswitch executables making it hardly possible to run openvswitch on embedded devices (for example running OpenWrt). Convert openvswitch to use libtool for building its internal libs. This

[ovs-dev] [PATCH v4.2 0/5] Implement OFPMP_TABLE_FEATURES GET

2013-12-09 Thread Alexander Wu
v4.2: Fix last table features id to 255. Fix wrong prints of last table features. Add more comments to describe the implement inner ovs: The bitmaps stores table features OFPTFPT13_* properties. Here are valid bits: Instructions: OFPIT11_GOTO_TABLE ~ OFPIT13_METER Next tab

[ovs-dev] [PATCH v4.2 1/5] ofp-actions: Complete ofp13_action_type and add function to use instructions.

2013-12-09 Thread Alexander Wu
v4: Add enums of ofp13_action_type and make them work. v3: Add func to get instruction/action name by OpenFlow instruction type directly. --- include/openflow/openflow-1.3.h | 20 ++-- lib/ofp-actions.c | 19 +++ lib/ofp-actions.h

[ovs-dev] [PATCH v4.2 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Alexander Wu
v4.1: Update bitmap_count1 function: call count_1bits to improve performance. v4: Add bitmap_count1 function to count all 1 bits. --- lib/bitmap.c | 15 +++ lib/bitmap.h |1 + 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index

[ovs-dev] [PATCH v4.2 5/5] ofctl: Add ovs-ofctl dump-table-features.

2013-12-09 Thread Alexander Wu
v4: No change. v3: No change. v2: No change v1: Now the cli we implement is very crude. Maybe it could display better. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- utilities/ovs-ofctl.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff -

[ovs-dev] [PATCH v4.2 3/5] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-12-09 Thread Alexander Wu
v4.2: Fix last table features id to 255. Add more comments. Fix wrong print of last table feature. v4: 1. Delete duplication code. 2. Add new acts in *.def. 3. Update abstract table-features to bitmap. 4. Make decode_openflow13_props more general. 5. Update tests. Correct the wriab

[ovs-dev] [PATCH v4.2 4/5] ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle.

2013-12-09 Thread Alexander Wu
v4.2: Fix last table features id to 255. v4: 1. update abstract table-features to bitmap 2. update ofproto, reduce copy when reply table features. 3. Move max_table_feature to oftable. v3: 1. Delete variable OFPIT13_END, use OFPIT13_METER directly. 2. Fix implement, restructure with m

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Helmut Schaa
On Mon, Dec 9, 2013 at 9:12 AM, Helmut Schaa wrote: > On Fri, Dec 6, 2013 at 7:58 PM, Ben Pfaff wrote: >> I think that your binaries must include debug symbols. I don't know why >> you would include debug symbols in binaries meant for a >> space-constrained application. > > Nope, I don't include

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Helmut Schaa
On Fri, Dec 6, 2013 at 8:04 PM, Ben Pfaff wrote: > On Fri, Dec 06, 2013 at 08:24:03AM -0800, Jarno Rajahalme wrote: >> >> On Dec 6, 2013, at 1:59 AM, Helmut Schaa wrote: >> >> > On Wed, Nov 27, 2013 at 10:35 AM, Helmut Schaa >> > wrote: >> >> Currently openvswitch builds all libraries static onl

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Helmut Schaa
On Fri, Dec 6, 2013 at 7:58 PM, Ben Pfaff wrote: > On Wed, Nov 27, 2013 at 10:35:39AM +0100, Helmut Schaa wrote: >> Currently openvswitch builds all libraries static only. However, >> libopenvswitch is linked into nearly all openvswitch executables >> making it hardly possible to run openvswitch o

Re: [ovs-dev] [PATCH] Use libtool for lib creation and allow building shared libs

2013-12-09 Thread Helmut Schaa
On Fri, Dec 6, 2013 at 5:24 PM, Jarno Rajahalme wrote: > > On Dec 6, 2013, at 1:59 AM, Helmut Schaa wrote: > >> On Wed, Nov 27, 2013 at 10:35 AM, Helmut Schaa >> wrote: >>> Currently openvswitch builds all libraries static only. However, >>> libopenvswitch is linked into nearly all openvswitch e

Re: [ovs-dev] [PATCH] vswitchd: Inherit parents mac address for fake bridges

2013-12-09 Thread Helmut Schaa
On Sat, Dec 7, 2013 at 6:20 PM, Ben Pfaff wrote: > On Fri, Dec 06, 2013 at 04:18:42PM +0100, Helmut Schaa wrote: >> When adding a physical port to the main bridge the mac address >> of the bridge is updated. We can do the same for fake bridges by >> copying the mac address of the parent bridge. >>