Re: [ovs-dev] [PATCH] bridge: Remove superfluous "inline" from ofp12_controller_role_to_str().

2013-12-06 Thread Ethan Jackson
Could we add a grep for this to the make? Ethan On Fri, Dec 6, 2013 at 3:57 PM, Joe Stringer wrote: > Acked-by: Joe Stringer > > On 20 November 2013 16:50, Ben Pfaff wrote: >> Putting "static inline" on a function definition in a .c file does not help >> the compiler and does suppress warnings

Re: [ovs-dev] [PATCH] Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. One additional paramater is pass

2013-12-06 Thread Ethan Jackson
I'm not planning to review this patch, but could you please reformat the commit message in a more standard way? I.E. something like: poll-loop: \n \n The current formatting doesn't play nicely with git send email. Ethan On Fri, Dec 6, 2013 at 4:41 PM, Linda Sun wrote: > Can you elaborate whi

Re: [ovs-dev] [PATCH] Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. One additional paramater is pass

2013-12-06 Thread Linda Sun
Can you elaborate which cases have duplicate fds? I've already used closesocket instead of close handle for sockets. I'll send a separate patch with the stream related changes. E.g. Replace read/write on socket with send/recv. Linda - Original Message - From: Eitan Eliahu To: Ben Pfaf

Re: [ovs-dev] [PATCH] Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. One additional paramater is pass

2013-12-06 Thread Eitan Eliahu
Ben and Linda, It seems that the first two comments could be addressed (by removing NULL events and duplicates handles. In regards to the third comments, if these handles are Sockets (which I believe they are) these handles should never be closed by calling CloseHandle(). For these socket hand

Re: [ovs-dev] [PATCH] Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. One additional paramater is pass

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 02:47:29PM -0800, Linda Sun wrote: > Signed-off-by: Linda Sun Hi Linda. Thanks for sending this along so that we can start figuring out how to work Windows into the poll loop. Looking at the documentation for WaitForMultipleObjects, I see a few possible issues. One is t

Re: [ovs-dev] [PATCH] bridge: Remove superfluous "inline" from ofp12_controller_role_to_str().

2013-12-06 Thread Joe Stringer
Acked-by: Joe Stringer On 20 November 2013 16:50, Ben Pfaff wrote: > Putting "static inline" on a function definition in a .c file does not help > the compiler and does suppress warnings for unused functions that one would > want, should the function ever become unused. > > Signed-off-by: Ben Pf

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Jarno Rajahalme
> On Dec 6, 2013, at 3:42 PM, Ben Pfaff wrote: > >> On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: >> Ofproto always provides a valid pointer to a mask, but the mask length >> is zero when megaflows are disabled. Use match_wc_init() to get an >> appropriate exact match mask wh

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Ben Pfaff
On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: > Ofproto always provides a valid pointer to a mask, but the mask length > is zero when megaflows are disabled. Use match_wc_init() to get an > appropriate exact match mask when there is no mask. > > Signed-off-by: Jarno Rajahalme

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

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 01:26:16PM -0800, Jarno Rajahalme wrote: > > On Dec 6, 2013, at 11:02 AM, 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

Re: [ovs-dev] [PATCH] vconn: Reply with OFPBRC_BAD_VERSION for bad version.

2013-12-06 Thread Joe Stringer
Looks good to me. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [v2] ofproto: Move bond files to ofproto

2013-12-06 Thread Andy Zhou
Pushed with changes suggested. Thanks a lot for the review. On Fri, Dec 6, 2013 at 2:46 PM, Joe Stringer wrote: > On 6 December 2013 14:27, Andy Zhou wrote: > > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c > > index 0f4cf2c..d64de65 100644 > > --- a/vswitchd/bridge.c > > +++ b/vswitchd/b

Re: [ovs-dev] [PATCH v5 3/4] lib/flow: Add IPv6 support for flow_compose().

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 12:54:40PM -0800, Jarno Rajahalme wrote: > I had forgot the line in there, was testing for alignment just for > my own understanding. flow_compose() would be little simpler if we > had the 32-bit aligned header definitions available. I felt hesitant > about using the Linux d

[ovs-dev] [PATCH] Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. One additional paramater is passed d

2013-12-06 Thread Linda Sun
Signed-off-by: Linda Sun --- lib/dpif-linux.c |2 +- lib/fatal-signal.c |2 +- lib/latch.c | 37 - lib/latch.h |3 +++ lib/netdev-linux.c |2 +- lib/netlink-socket.c |2 +- lib/poll-loop.c | 18

Re: [ovs-dev] [v2] ofproto: Move bond files to ofproto

2013-12-06 Thread Joe Stringer
On 6 December 2013 14:27, Andy Zhou wrote: > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c > index 0f4cf2c..d64de65 100644 > --- a/vswitchd/bridge.c > +++ b/vswitchd/bridge.c > @@ -21,7 +21,7 @@ > #include "async-append.h" > #include "bfd.h" > #include "bitmap.h" > -#include "bond.h" > +#i

Re: [ovs-dev] [PATCH] ofproto: Move bond files to ofproto

2013-12-06 Thread Andy Zhou
Ah, I forgot. Will send it out again. Thanks. On Fri, Dec 6, 2013 at 2:09 PM, Joe Stringer wrote: > On 6 December 2013 14:02, Andy Zhou wrote: > > This are no functional changes. > > ... > > 5 files changed, 3 insertions(+), 1662 deletions(-) > > Uh, did you add the new files to the patch?

Re: [ovs-dev] [PATCH] ofproto: Move bond files to ofproto

2013-12-06 Thread Joe Stringer
On 6 December 2013 14:02, Andy Zhou wrote: > This are no functional changes. > ... > 5 files changed, 3 insertions(+), 1662 deletions(-) Uh, did you add the new files to the patch? ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman

[ovs-dev] [PATCH] ofproto: Move bond files to ofproto

2013-12-06 Thread Andy Zhou
Relocating bond.[ch] to allow bond.c to make ofproto calls. This is needed for upcoming patches that enable megaflow support for bond ports. This are no functional changes. Signed-off-by: Andy Zhou --- lib/automake.mk |2 - lib/bond.c | 1560

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

2013-12-06 Thread Joe Stringer
On 5 December 2013 15:42, Joe Stringer wrote: > + * Tries not to count hyper-threads, but may be inaccurate - particularly on > + * platforms that do not provide /proc/cpuinfo, but also if /proc/cpuinfo is > + * formatted different to the layout that parse_cpuinfo() expects. */ Just highlighting

Re: [ovs-dev] [PATCH] datapath: Don't allocate space for per-CPU flow stats from cache.

2013-12-06 Thread Jesse Gross
On Fri, Dec 6, 2013 at 1:45 PM, Pravin Shelar wrote: > On Fri, Dec 6, 2013 at 1:19 PM, Jesse Gross wrote: >> Per-CPU flow stats are now allocated separately (if necessary) so >> there's no longer any need to allocate space for them directly in >> the base flow. >> >> Signed-off-by: Jesse Gross >

Re: [ovs-dev] [PATCH] datapath: Don't allocate space for per-CPU flow stats from cache.

2013-12-06 Thread Pravin Shelar
On Fri, Dec 6, 2013 at 1:19 PM, Jesse Gross wrote: > Per-CPU flow stats are now allocated separately (if necessary) so > there's no longer any need to allocate space for them directly in > the base flow. > > Signed-off-by: Jesse Gross Looks good. Acked-by: Pravin B Shelar > --- > datapath/flo

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

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 1:26 PM, Jarno Rajahalme wrote: > > On Dec 6, 2013, at 11:02 AM, Ben Pfaff wrote: >> >> Clang reports: >>../lib/classifier.c:1570:40: error: bad constant expression >> referring to this line in trie_remove(): >>struct trie_node *nodes[trie->field->n_bytes]; >> >

Re: [ovs-dev] [PATCH] util: Better count_1bits().

2013-12-06 Thread Jarno Rajahalme
Pushed as-is, leaving Ben’s preference as an opportunity for future improvement. Jarno On Dec 6, 2013, at 9:24 AM, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:36:26PM -0800, Jarno Rajahalme wrote: >> Inline, use another well-known algorithm for 64-bit builds, and use >> builtins when they a

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

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 11:02 AM, 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

[ovs-dev] [PATCH] datapath: Don't allocate space for per-CPU flow stats from cache.

2013-12-06 Thread Jesse Gross
Per-CPU flow stats are now allocated separately (if necessary) so there's no longer any need to allocate space for them directly in the base flow. Signed-off-by: Jesse Gross --- datapath/flow_table.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/datapath/flow_table.

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 12:53 PM, Ben Pfaff wrote: > On Fri, Dec 06, 2013 at 11:48:58AM -0800, Jarno Rajahalme wrote: >> >> On Dec 6, 2013, at 9:40 AM, Ben Pfaff wrote: >> >>> On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: Ofproto always provides a valid pointer to a mask, b

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

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 12:51:25PM -0800, Ben Pfaff wrote: > On Fri, Dec 06, 2013 at 07:35:45PM +, Alin Serdean wrote: > > Signed-off-by: Alin Serdean > > --- > > lib/string.h |4 > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/lib/string.h b/lib/string.h >

Re: [ovs-dev] [PATCH v5 3/4] lib/flow: Add IPv6 support for flow_compose().

2013-12-06 Thread Jarno Rajahalme
Ben, I pushed this after I removed the offending assert and changed to use normal hton macros. I had forgot the line in there, was testing for alignment just for my own understanding. flow_compose() would be little simpler if we had the 32-bit aligned header definitions available. I felt hesit

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 11:48:58AM -0800, Jarno Rajahalme wrote: > > On Dec 6, 2013, at 9:40 AM, Ben Pfaff wrote: > > > On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: > >> Ofproto always provides a valid pointer to a mask, but the mask length > >> is zero when megaflows are dis

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

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 07:35:45PM +, Alin Serdean wrote: > Signed-off-by: Alin Serdean > --- > lib/string.h |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/lib/string.h b/lib/string.h > index 2b7b454..6981742 100644 > --- a/lib/string.h > +++ b/lib/string.h

[ovs-dev] [PATCH] bfd: Set next_tx correctly when processing packets

2013-12-06 Thread Joe Stringer
In the case where we have not yet sent a control packet for a bfd connection, and we receive a control packet from the remote host, bfd->next_tx is updated to an unusual value. This causes the logging to incorrectly report that there has been long delays (in the order of weeks) since the last bfd t

Re: [ovs-dev] staged match question.

2013-12-06 Thread Ethan Jackson
Sounds good, I'll have joe or alex look at it. Ethan On Thu, Dec 5, 2013 at 4:42 PM, Jarno Rajahalme wrote: > > On Dec 5, 2013, at 1:02 PM, Ethan Jackson wrote: > >> I'm working on a patch to disable wildcard calculation when we're >> doing things like pushing stats and don't actually need to k

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

2013-12-06 Thread Gurucharan Shetty
On Fri, Dec 6, 2013 at 12:03 PM, Alin Serdean wrote: > I think we should use _WIN32 (it is predefined for both Win32 and Win64) :). > > http://msdn.microsoft.com/en-us/library/b0084kay.aspx I see what you mean. You are correct. I was referring to the WIN32 defined through config.h. So your change

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

2013-12-06 Thread Alin Serdean
I think we should use _WIN32 (it is predefined for both Win32 and Win64) :). http://msdn.microsoft.com/en-us/library/b0084kay.aspx Kind Regards, Alin. From: Gurucharan Shetty [shet...@nicira.com] Sent: Friday, December 06, 2013 9:47 PM To: Alin Serdean Cc:

Re: [ovs-dev] [PATCH] datapath: compat: Fix compilation for kernel 3.5

2013-12-06 Thread Jesse Gross
On Fri, Dec 6, 2013 at 11:43 AM, Pravin B Shelar wrote: > ipv6_addr_hash() is not available on kernel 3.5, Use compat version. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mai

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 9:40 AM, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: >> Ofproto always provides a valid pointer to a mask, but the mask length >> is zero when megaflows are disabled. Use match_wc_init() to get an >> appropriate exact match mask when th

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

2013-12-06 Thread Gurucharan Shetty
On Fri, Dec 6, 2013 at 11:35 AM, Alin Serdean wrote: > Signed-off-by: Alin Serdean > --- > lib/string.h |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/lib/string.h b/lib/string.h > index 2b7b454..6981742 100644 > --- a/lib/string.h > +++ b/lib/string.h > @@ -17,

[ovs-dev] [PATCH] datapath: compat: Fix compilation for kernel 3.5

2013-12-06 Thread Pravin B Shelar
ipv6_addr_hash() is not available on kernel 3.5, Use compat version. Signed-off-by: Pravin B Shelar --- datapath/linux/compat/include/net/ipv6.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/datapath/linux/compat/include/net/ipv6.h b/datapath/linux/compat/include/net

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

2013-12-06 Thread Alin Serdean
Signed-off-by: Alin Serdean --- lib/string.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/string.h b/lib/string.h index 2b7b454..6981742 100644 --- a/lib/string.h +++ b/lib/string.h @@ -17,7 +17,11 @@ #ifndef STRING_WRAPPER_H #define STRING_WRAPPER_H 1 +#ifde

Re: [ovs-dev] Windows port status

2013-12-06 Thread Gurucharan Shetty
On Fri, Dec 6, 2013 at 9:42 AM, Alin Serdean wrote: > Guru can you do a quick review over the following: Can you please send as a inline mail with a proper commit message (you can look at SubmittingPatches or dev archives for examples) and a Signed-off-by. > diff --git a/lib/string.h b/lib/string

Re: [ovs-dev] [PATCH] datapath: compat: Fix Compiler error for kernel 3.3 to 3.8

2013-12-06 Thread Pravin Shelar
I pushed patch to master. Thanks. On Fri, Dec 6, 2013 at 11:05 AM, Jesse Gross wrote: > On Fri, Dec 6, 2013 at 10:43 AM, Pravin B Shelar wrote: >> Kernel 3.3 to 3.8 has defined `struct flow_keys` but does not >> contains flow_keys.thoff field. Therefore we need to use >> compat definition for

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

2013-12-06 Thread Ben Pfaff
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 only. However, > >> libopenvswitch is linked into nearly al

Re: [ovs-dev] [PATCH] datapath: compat: Fix Compiler error for kernel 3.3 to 3.8

2013-12-06 Thread Jesse Gross
On Fri, Dec 6, 2013 at 10:43 AM, Pravin B Shelar wrote: > Kernel 3.3 to 3.8 has defined `struct flow_keys` but does not > contains flow_keys.thoff field. Therefore we need to use > compat definition for flow_keys struct. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross

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

2013-12-06 Thread Ben Pfaff
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 in a packet header being > classified. This enables l

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

2013-12-06 Thread Ben Pfaff
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 on embedded devices > (for example running OpenWrt). >

[ovs-dev] [PATCH] datapath: compat: Fix Compiler error for kernel 3.3 to 3.8

2013-12-06 Thread Pravin B Shelar
Kernel 3.3 to 3.8 has defined `struct flow_keys` but does not contains flow_keys.thoff field. Therefore we need to use compat definition for flow_keys struct. Signed-off-by: Pravin B Shelar --- datapath/linux/compat/include/net/flow_keys.h |2 +- 1 files changed, 1 insertions(+), 1 deletion

Re: [ovs-dev] [PATCH v5 3/4] lib/flow: Add IPv6 support for flow_compose().

2013-12-06 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 09:46:29AM -0800, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:27:25PM -0800, Jarno Rajahalme wrote: > > Add the missing code for generating IPv6 packets for testing purposes. > > > > Also make flow_compose() set the l4 and l7 pointers more consistently > > with flow_extra

Re: [ovs-dev] [PATCH 2/2] vlog: Add option to send vlog syslog output to arbitrary UDP destination.

2013-12-06 Thread Ben Pfaff
I applied this patch to master. Henry, thanks for the review. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 1/2] vlog: Avoid deadlock in vlog_init__() corner case.

2013-12-06 Thread Ben Pfaff
On Thu, Dec 05, 2013 at 05:02:00PM -0800, Ben Pfaff wrote: > Anything inside vlog_init__() that tried to log a message was going to > deadlock, since it would hit pthread_once() recursively and wait for the > previous call to complete. Unfortunately, there was a VLOG_ERR call inside > vlog_init__(

[ovs-dev] [PATCH] vlog: Avoid deadlock in vlog_init__() corner case.

2013-12-06 Thread Ben Pfaff
Anything inside vlog_init__() that tried to log a message was going to deadlock, since it would hit pthread_once() recursively and wait for the previous call to complete. Unfortunately, there was a VLOG_ERR call inside vlog_init__(), only called in the corner case where the system's clock was wron

Re: [ovs-dev] [PATCH v5 3/4] lib/flow: Add IPv6 support for flow_compose().

2013-12-06 Thread Ben Pfaff
On Thu, Dec 05, 2013 at 04:27:25PM -0800, Jarno Rajahalme wrote: > Add the missing code for generating IPv6 packets for testing purposes. > > Also make flow_compose() set the l4 and l7 pointers more consistently > with flow_extract(). > > Signed-off-by: Jarno Rajahalme Would you please use uint

Re: [ovs-dev] Windows port status

2013-12-06 Thread Alin Serdean
Guru can you do a quick review over the following: diff --git a/lib/string.h b/lib/string.h index 2b7b454..6981742 100644 --- a/lib/string.h +++ b/lib/string.h @@ -17,7 +17,11 @@ #ifndef STRING_WRAPPER_H #define STRING_WRAPPER_H 1 +#ifdef _WIN32 +#include <../include/string.h> +#else #include_n

Re: [ovs-dev] [PATCH v5 2/4] dpif-netdev: Do not check mask if it doesn't exist.

2013-12-06 Thread Ben Pfaff
On Thu, Dec 05, 2013 at 04:27:24PM -0800, Jarno Rajahalme wrote: > Ofproto always provides a valid pointer to a mask, but the mask length > is zero when megaflows are disabled. Use match_wc_init() to get an > appropriate exact match mask when there is no mask. I'm having a little trouble understa

Re: [ovs-dev] [PATCH] datapath: compat: Fix compiler error.

2013-12-06 Thread Pravin Shelar
On Fri, Dec 6, 2013 at 8:39 AM, Jesse Gross wrote: > On Thu, Dec 5, 2013 at 7:48 PM, Pravin B Shelar wrote: >> Earlier RHEL6 kernel do not have linux/atomic.h header >> file. Use types.h to get atomic_t definition. >> >> Signed-off-by: Pravin B Shelar > > Acked-by: Jesse Gross I pushed it to

Re: [ovs-dev] [PATCH] util: Better count_1bits().

2013-12-06 Thread Ben Pfaff
On Thu, Dec 05, 2013 at 04:36:26PM -0800, Jarno Rajahalme wrote: > Inline, use another well-known algorithm for 64-bit builds, and use > builtins when they are known to be fast at compile time. A 32-bit > version of the alternate algorithm is slower than the existing > implementation, so the old o

Re: [ovs-dev] [PATCH] datapath: compat: Fix compiler error.

2013-12-06 Thread Jesse Gross
On Thu, Dec 5, 2013 at 7:48 PM, Pravin B Shelar wrote: > Earlier RHEL6 kernel do not have linux/atomic.h header > file. Use types.h to get atomic_t definition. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list dev@openvswi

Re: [ovs-dev] [PATCH v5 1/4] lib/odp-util: Only use expected_bit when set.

2013-12-06 Thread Jarno Rajahalme
Pushed, thanks! Jarno On Dec 5, 2013, at 5:11 PM, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:27:23PM -0800, Jarno Rajahalme wrote: >> parse_l2_5_onward() previously used out of range 'expected_bit' when >> it was called with no attrs, which happens when parsing a mask with >> zero length.

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

2013-12-06 Thread Jarno Rajahalme
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 executables >> making it hardly possible to run openvswitch on em

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

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 1:18 AM, Alexander Wu wrote: > Hi Jarno, > > I've read your patch "better count1_bits", and I test the gcc > builtins separately. > > Call __builtin_popcount|__builtin_popcountl|__builtin_popcountll 10 million > times > -- >suse-kvm-o

Re: [ovs-dev] [PATCH] util: Better count_1bits().

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 7:36 AM, Jarno Rajahalme wrote: > On Dec 5, 2013, at 4:44 PM, Ben Pfaff wrote: >> How did you measure the benefit of inlining? > > With a standalone C program running different variants (original, inlined, > different algorithm) over I should mention that I linked with a st

Re: [ovs-dev] [PATCH] util: Better count_1bits().

2013-12-06 Thread Jarno Rajahalme
On Dec 5, 2013, at 4:44 PM, Ben Pfaff wrote: > On Thu, Dec 05, 2013 at 04:36:26PM -0800, Jarno Rajahalme wrote: >> Inline, use another well-known algorithm for 64-bit builds, and use >> builtins when they are known to be fast at compile time. A 32-bit >> version of the alternate algorithm is sl

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

2013-12-06 Thread Helmut Schaa
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. There exists only one fake bridge per vlan, hence it is safe to copy the mac address of the parent bridge. Signed-off-by: H

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

2013-12-06 Thread Helmut Schaa
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 executables > making it hardly possible to run openvswitch on embedded devices > (for example running OpenWrt). > > Conver

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

2013-12-06 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.1 4/5] ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle.

2013-12-06 Thread Alexander Wu
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 macro. 3. Add comments that describe table-

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

2013-12-06 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.1 3/5] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-12-06 Thread Alexander Wu
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 wriable oxms. v3: 1. Update names of functions/macros to make them meaningful. 2. Fix codingstyle. 3. Re

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

2013-12-06 Thread Alexander Wu
v4.1: Update bitmap_count1 implemnt to call count1_bits directly. Bitmap is a separate subsystem, so I think bitmap_count1 is needed. v4: Implement abstract bitmap for table feature properties. Make prop functions more general. Remove duplicated code, use existed implement. Squash some

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

2013-12-06 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

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

2013-12-06 Thread Alexander Wu
Hi Jarno, I've read your patch "better count1_bits", and I test the gcc builtins separately. Call __builtin_popcount|__builtin_popcountl|__builtin_popcountll 10 million times -- suse-kvm-of13:/test # time ./bit4 real0m0.034s user0m0.032s