Re: [ovs-dev] Support for MCAST_Snooping

2014-11-20 Thread Helmut Schaa
On Thu, Nov 20, 2014 at 5:43 AM, Ben Pfaff wrote: > On Thu, Nov 20, 2014 at 08:53:04AM +0530, Aman Kumar wrote: >> I tried to enable multicast snooping but i was not able to do that, >> currently i am using ovs-2.3.0 but i am not sure that it supports multicast >> snooping or not. >> >> Can you pl

Re: [ovs-dev] [PATCH v2] rhel: Fix build failures because of libraries in /usr/lib.

2013-12-19 Thread Helmut Schaa
On Wed, Dec 18, 2013 at 10:25 PM, Gurucharan Shetty wrote: > Reported-by: Igor Sever > Signed-off-by: Gurucharan Shetty > --- > AUTHORS |1 + > rhel/openvswitch-fedora.spec.in |2 +- > rhel/openvswitch.spec.in|2 +- > 3 files changed, 3 insertions(+),

Re: [ovs-dev] [PATCH v2] rhel: Fix build failures because of libraries in /usr/lib.

2013-12-20 Thread Helmut Schaa
On Fri, Dec 20, 2013 at 12:54 AM, Gurucharan Shetty wrote: >> >> Thanks for looking into this. Does that also work on x86_64? > Yes. The errors were seen in x86_64 machines. > >> The libraries would be installed to lib64 instead, thus not getting >> deleted and thus maybe triggering "unpackaged fi

[ovs-dev] [PATCH 1/2] netdev-linux: Use unsigned int for ifi_flags

2014-01-08 Thread Helmut Schaa
ifi_flags is unsigned, the local equivalents should do the same. Signed-off-by: Helmut Schaa --- Otherwise the follow-up patch throws a warning during conmpilation. lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c

[ovs-dev] [PATCH 2/2] netdev-linux: Let interface flags survive port setup

2014-01-08 Thread Helmut Schaa
just before updating them if they have not been updated by from the kernel yet. Signed-off-by: Helmut Schaa --- lib/netdev-linux.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index d0afaf6..b23cc6a 100644 --- a/lib/netdev

Re: [ovs-dev] [PATCH 2/2] netdev-linux: Let interface flags survive port setup

2014-01-08 Thread Helmut Schaa
On Thu, Jan 9, 2014 at 1:59 AM, Ben Pfaff wrote: > On Wed, Jan 08, 2014 at 04:43:47PM +0100, Helmut Schaa wrote: >> Due to a race condition when bringing up an internal port on Linux >> some interface flags (e.g. IFF_MULTICAST) are falsely reset. This >> happens because

Re: [ovs-dev] [PATCH 1/2] netdev-linux: Use unsigned int for ifi_flags

2014-01-08 Thread Helmut Schaa
On Thu, Jan 9, 2014 at 1:09 AM, Ben Pfaff wrote: > On Wed, Jan 08, 2014 at 04:43:46PM +0100, Helmut Schaa wrote: >> ifi_flags is unsigned, the local equivalents should do the same. >> >> Signed-off-by: Helmut Schaa > > In the GNU C library, ifru_flags in struct ifr

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

2014-01-17 Thread Helmut Schaa
On Fri, Jan 17, 2014 at 2:44 AM, Ben Pfaff wrote: > On Mon, Dec 09, 2013 at 09:01:57AM +0100, Helmut Schaa wrote: >> 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 p

Re: [ovs-dev] [PATCH 2/2] netdev-linux: Let interface flags survive port setup

2014-01-17 Thread Helmut Schaa
On Thu, Jan 9, 2014 at 5:48 PM, Ben Pfaff wrote: > On Thu, Jan 09, 2014 at 08:51:00AM +0100, Helmut Schaa wrote: >> On Thu, Jan 9, 2014 at 1:59 AM, Ben Pfaff wrote: >> > On Wed, Jan 08, 2014 at 04:43:47PM +0100, Helmut Schaa wrote: >> >> Due to a race condition whe

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

2014-02-03 Thread Helmut Schaa
On Fri, Jan 31, 2014 at 8:29 PM, Ben Pfaff wrote: > On Fri, Jan 17, 2014 at 05:18:17PM +0100, Helmut Schaa wrote: >> On Fri, Jan 17, 2014 at 2:44 AM, Ben Pfaff wrote: >> > On Mon, Dec 09, 2013 at 09:01:57AM +0100, Helmut Schaa wrote: >> >> On Sat, Dec 7, 201

[ovs-dev] [PATCH 2/2] vswitchd: Limit fake bridge MAC selection to ports in the same VLAN

2014-02-19 Thread Helmut Schaa
Limit fake bridge MAC address selection to only consider ports that use the same VLAN as the fake bridge itself. This prevents OVS from selecting a MAC address that was not really present in the VLAN of the fake bridge before. Signed-off-by: Helmut Schaa --- I'm running this patchset on t

[ovs-dev] [PATCH 1/2] vswitchd: Split pick_local_hw_addr

2014-02-19 Thread Helmut Schaa
This allows to reuse find_local_hw_addr for fake bridges. Preparation for upcoming MAC address inheritance for fake bridges. Signed-off-by: Helmut Schaa --- vswitchd/bridge.c | 44 ++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a

Re: [ovs-dev] [PATCH 2/2] vswitchd: Limit fake bridge MAC selection to ports in the same VLAN

2014-02-27 Thread Helmut Schaa
On Wed, Feb 26, 2014 at 9:54 PM, Ben Pfaff wrote: > On Wed, Feb 19, 2014 at 11:59:33AM +0100, Helmut Schaa wrote: >> Limit fake bridge MAC address selection to only consider ports >> that use the same VLAN as the fake bridge itself. >> >> This prevents OVS from selec

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

2013-11-27 Thread Helmut Schaa
/ovs-pki 112K./bin/ovs-dpctl 4.0K./bin/ovs-parse-backtrace 4.0K./bin/ovs-l3ping 264K./bin/vtep-ctl 4.0K./bin/ovs-tcpundump 11M total Signed-off-by: Helmut Schaa --- Makefile.am | 2 +- configure.ac | 1 + lib/automake.mk | 36 ---

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 run

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

2013-12-06 Thread Helmut Schaa
: Helmut Schaa --- vswitchd/bridge.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 6ce7d2b..4647da2 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -259,7 +259,7 @@ static struct iface *iface_find(const

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

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, >>> libopenvswitc

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 possib

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: >> >>

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 appl

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

2013-12-09 Thread Helmut Schaa
296K./bin/ovs-vsctl 8.0K./bin/ovs-test 28K ./bin/ovs-appctl 4.0K./bin/ovs-pcap 252K./bin/ovs-ofctl 60K ./bin/ovsdb-tool 16K ./bin/ovs-pki 112K./bin/ovs-dpctl 4.0K./bin/ovs-parse-backtrace 4.0K./bin/ovs-l3ping 264K./bin/vtep-ctl 4.0K./bin/ovs-tcpundump 1

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 emb

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

2013-12-10 Thread Helmut Schaa
On Mon, Dec 9, 2013 at 8:19 PM, Ben Pfaff wrote: > 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 possib

[ovs-dev] [RFC 0/4] openvswitch: Get rid of special segments for vlog and coverage implemenation

2013-12-10 Thread Helmut Schaa
this will cause some side-effects since the special segment is created once for each lib and executable. Sending as RFC since this does not work (yet) on MSVC. Helmut Schaa (4): compiler: Add OVS_CONSTRUCTOR to mark functions as init functions vlog: Use OVS_CONSTRUCTOR for vlog initialization

[ovs-dev] [RFC 2/4] vlog: Use OVS_CONSTRUCTOR for vlog initialization

2013-12-10 Thread Helmut Schaa
by using the global list vlog_modules. Signed-off-by: Helmut Schaa --- lib/vlog.c | 63 +++--- lib/vlog.h | 20 2 files changed, 35 insertions(+), 48 deletions(-) diff --git a/lib/vlog.c b/lib/vlog.c index 0fa1ab2

[ovs-dev] [RFC 4/4] Remove unused USE_LINKER_SECTIONS

2013-12-10 Thread Helmut Schaa
Signed-off-by: Helmut Schaa --- configure.ac | 1 - lib/automake.mk | 22 -- m4/openvswitch.m4 | 34 -- 3 files changed, 57 deletions(-) diff --git a/configure.ac b/configure.ac index 167cc71..96880af 100644 --- a/configure.ac +++ b

[ovs-dev] [RFC 3/4] coverage: Use OVS_CONSTRUCTOR to initialize the coverage counter array

2013-12-10 Thread Helmut Schaa
Use a global array that gets initialized by constructor functions per coverage definition. Signed-off-by: Helmut Schaa --- The realloc is not the nicest thing to do but looks reasonable as initial approach. Using a list would cause more intrusive changes to the coverage implementation. lib

[ovs-dev] [RFC 1/4] compiler: Add OVS_CONSTRUCTOR to mark functions as init functions

2013-12-10 Thread Helmut Schaa
Functions marked with OVS_CONSTRUCTOR are called unconditionally before main. Signed-off-by: Helmut Schaa --- This works with gcc (tested), should work with clang (untested) but does not work with MSVS. Could anyone using MSVC try if the solution described at http://stackoverflow.com/questions

Re: [ovs-dev] [RFC 1/4] compiler: Add OVS_CONSTRUCTOR to mark functions as init functions

2013-12-11 Thread Helmut Schaa
On Wed, Dec 11, 2013 at 12:10 AM, Gurucharan Shetty wrote: > On Tue, Dec 10, 2013 at 5:49 AM, Helmut Schaa > wrote: >> Functions marked with OVS_CONSTRUCTOR are called unconditionally >> before main. >> >> Signed-off-by: Helmut Schaa >> --- >> >>

Re: [ovs-dev] [RFC 3/4] coverage: Use OVS_CONSTRUCTOR to initialize the coverage counter array

2013-12-12 Thread Helmut Schaa
On Wed, Dec 11, 2013 at 10:00 PM, Ben Pfaff wrote: > On Tue, Dec 10, 2013 at 02:49:29PM +0100, Helmut Schaa wrote: >> Use a global array that gets initialized by constructor functions >> per coverage definition. >> >> Signed-off-by: Helmut Schaa >> --- >>

[ovs-dev] [PATCH 0/6] Reduce binary size of OVS by using shared libs

2013-12-13 Thread Helmut Schaa
This series converts OVS to use shared libs for its internal stuff instead of linking everything static. Helmut Schaa (6): compiler: Add OVS_CONSTRUCTOR to mark functions as init functions vlog: Use OVS_CONSTRUCTOR for vlog initialization coverage: Use OVS_CONSTRUCTOR to initialize the

[ovs-dev] [PATCH 1/6] compiler: Add OVS_CONSTRUCTOR to mark functions as init functions

2013-12-13 Thread Helmut Schaa
Functions marked with OVS_CONSTRUCTOR are called unconditionally before main. Tested with GCC. Untested with MSVC. Signed-off-by: Helmut Schaa --- lib/compiler.h | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/compiler.h b/lib/compiler.h index 0dbacbf..daca32d 100644

[ovs-dev] [PATCH 2/6] vlog: Use OVS_CONSTRUCTOR for vlog initialization

2013-12-13 Thread Helmut Schaa
by using the global list vlog_modules. Signed-off-by: Helmut Schaa --- lib/vlog.c | 63 +++--- lib/vlog.h | 16 +--- 2 files changed, 32 insertions(+), 47 deletions(-) diff --git a/lib/vlog.c b/lib/vlog.c index 0fa1ab2..540e72a

[ovs-dev] [PATCH 5/6] openvswitch: Use libtool and allow building shared libs

2013-12-13 Thread Helmut Schaa
allow different openvswitch versions to coexist Changes since v2: * CPPFLAGS have been missing during compilation in some libs Signed-off-by: Helmut Schaa --- Makefile.am | 2 +- configure.ac | 2 +- lib/automake.mk | 39 ++-- ofproto/automak

[ovs-dev] [PATCH 6/6] rhel, fedora: Remove *.a and *.la from rpms

2013-12-13 Thread Helmut Schaa
Signed-off-by: Helmut Schaa --- This is untested since I don't use/have RHEL or Fedora. I'd be glad if anyone could give that change a try. Thanks, Helmut rhel/openvswitch-fedora.spec.in | 3 +++ rhel/openvswitch.spec.in| 1 + 2 files changed, 4 insertions(+) diff --

[ovs-dev] [PATCH 4/6] Remove unused USE_LINKER_SECTIONS and OVS_LINK2_IFELSE

2013-12-13 Thread Helmut Schaa
They are unused and can be removed. Signed-off-by: Helmut Schaa --- configure.ac | 1 - lib/automake.mk | 22 m4/openvswitch.m4 | 77 --- 3 files changed, 100 deletions(-) diff --git a/configure.ac b/configure.ac

[ovs-dev] [PATCH 3/6] coverage: Use OVS_CONSTRUCTOR to initialize the coverage counter array

2013-12-13 Thread Helmut Schaa
Use a static array in coverage.c that gets initialized by constructor functions per coverage definition. Signed-off-by: Helmut Schaa --- lib/coverage.c | 46 +++--- lib/coverage.h | 20 ++-- 2 files changed, 21 insertions(+), 45 deletions

[ovs-dev] [PATCH 4/5] lib/util.h: Disable ovs_assert when build with NDEBUG

2013-12-13 Thread Helmut Schaa
Reduces binary size. Use a static inline function instead of a macro to not get "unused variable" warning everywhere. Signed-off-by: Helmut Schaa --- Not sure if this is the best idea but in my builds it reduces libopenvswitch by around 10%. Thoughts? Thanks, Helmut lib/util.h |

[ovs-dev] [PATCH 5/5] lib/util: Make some functions in util.c inline

2013-12-13 Thread Helmut Schaa
str_to_uint, str_to_ulong and str_to_ullong are just wrappers around the corresponding signed functions. Move these to util.h and make them inline saving some library exports and letting the compiler do some more magic. Signed-off-by: Helmut Schaa --- lib/util.c | 18 -- lib

[ovs-dev] [PATCH 3/5] lib/mac-learning: Add missing semicolon

2013-12-13 Thread Helmut Schaa
Does not matter as long as ovs_assert is a simple macro but if ovs_assert is converted to a function this will fail. Signed-off-by: Helmut Schaa --- lib/mac-learning.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mac-learning.c b/lib/mac-learning.c index fe06744

[ovs-dev] [PATCH 1/5] lib/ofp: Consolidate some struct field orders

2013-12-13 Thread Helmut Schaa
Avoid "holes" in structs by moving "small" members together. Signed-off-by: Helmut Schaa --- lib/ofp-actions.h | 2 +- lib/ofp-util.h| 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ofp-actions.h b/lib/ofp-actions.h index 470a371..00cba6a

[ovs-dev] [PATCH 2/5] lib/random: Make some functions in random.c inline

2013-12-13 Thread Helmut Schaa
random_range, random_uint8 and random_uint16 are basically just wrappers around random_uint32. Hence, don't export these functions so the compiler can be smarter when it comes to optimizations. Signed-off-by: Helmut Schaa --- lib/random.c | 17 - lib/random.h

[ovs-dev] [PATCH 0/5] Minor size reduction patch set

2013-12-13 Thread Helmut Schaa
Helmut Schaa (5): lib/ofp: Consolidate some struct field orders lib/random: Make some functions in random.c inline lib/mac-learning: Add missing semicolon lib/util.h: Disable ovs_assert when build with NDEBUG lib/util: Make some functions in util.c inline lib/mac-learning.c | 2

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

2013-12-13 Thread Helmut Schaa
On Fri, Dec 13, 2013 at 6:27 PM, Ben Pfaff wrote: > On Fri, Dec 13, 2013 at 02:05:04PM +0100, Helmut Schaa wrote: >> Currently openvswitch builds all libraries static only. However, >> libopenvswitch is linked into nearly all openvswitch executables >> making it hardly possib

Re: [ovs-dev] [PATCH 1/5] lib/ofp: Consolidate some struct field orders

2013-12-13 Thread Helmut Schaa
On Fri, Dec 13, 2013 at 5:35 PM, Ben Pfaff wrote: > On Fri, Dec 13, 2013 at 02:17:13PM +0100, Helmut Schaa wrote: >> Avoid "holes" in structs by moving "small" members together. >> >> Signed-off-by: Helmut Schaa > > I don't think any of th

Re: [ovs-dev] [PATCH 4/5] lib/util.h: Disable ovs_assert when build with NDEBUG

2013-12-13 Thread Helmut Schaa
On Fri, Dec 13, 2013 at 6:08 PM, Ben Pfaff wrote: > On Fri, Dec 13, 2013 at 02:17:16PM +0100, Helmut Schaa wrote: >> Reduces binary size. Use a static inline function instead of >> a macro to not get "unused variable" warning everywhere. >> >> Signed-off-by: H

[ovs-dev] [PATCHv2] lib/util.h: Disable ovs_assert when build with NDEBUG

2013-12-13 Thread Helmut Schaa
Reduces binary size. Use a static inline function instead of a macro to not get "unused variable" warnings everywhere. Making ovs_assert an empty inline in the header file effectively optimizes out all calls to ovs_assert. Signed-off-by: Helmut Schaa --- lib/util.h | 7 ++- 1 fi

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

2013-12-13 Thread Helmut Schaa
nal and thus not stable (yet) encode the openvswitch version into the library name: libopenvswitch-2.0.90.so Binary size is reduced to around 1/3 when using shared libs. Signed-off-by: Helmut Schaa --- Changes since v1: * Fix some autotools warnings * Encode OVS version into the library name (libop

Re: [ovs-dev] [PATCHv2] lib/util.h: Disable ovs_assert when build with NDEBUG

2013-12-13 Thread Helmut Schaa
Ben Pfaff schrieb: >On Fri, Dec 13, 2013 at 10:30:56AM -0800, Ben Pfaff wrote: >> On Fri, Dec 13, 2013 at 06:54:27PM +0100, Helmut Schaa wrote: >> > Reduces binary size. Use a static inline function instead of >> > a macro to not get "unused variable" w

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

2013-12-18 Thread Helmut Schaa
On Wed, Dec 18, 2013 at 1:29 AM, Ben Pfaff wrote: > On Fri, Dec 13, 2013 at 06:54:28PM +0100, Helmut Schaa wrote: >> Currently openvswitch builds all libraries static only. However, >> libopenvswitch is linked into nearly all openvswitch executables >> making it hardly possib