[ovs-dev] [PATCH 2/2] netdev: Fix an use of uninitialized mutex.

2014-04-29 Thread Alex Wang
Commit 05bf6d3c62e1d (ovs-thread: Add checking for mutex and rwlock initialization.) helps find an use of uninitialized mutex (netdev_class_mutex) during upgrade. The assertion check aborts the ovs. This commit fixes the issue by adding the proper initialization. Bug #1239914. Bug #1240598. Bug

[ovs-dev] [PATCH 1/2] dpif-linux: Fix a bug in creating port.

2014-04-29 Thread Alex Wang
Based on the policy of 'OVS_VPORT_ATTR_UPCALL_PID', if upcall should not be sent to userspace (i.e. the number of handler threads is zero), the netlink message for creating vport should be an one-element array of value 0. However, dpif_linux_port_add__() fails to obey it and generates

Re: [ovs-dev] [PATCH v3 07/16] ofproto-dpif: Bonding with in_port that isn't present in the datapath

2014-04-29 Thread Andy Zhou
If p7 and p37 are now connected together as patch ports, would any traffic injected from p7 bypass (in the user space) the bond interfaces all-together? On Sun, Apr 27, 2014 at 6:24 PM, Simon Horman ho...@verge.net.au wrote: On Fri, Apr 25, 2014 at 12:46:16AM -0700, Andy Zhou wrote: Simon, I

Re: [ovs-dev] [PATCH v3 07/16] ofproto-dpif: Bonding with in_port that isn't present in the datapath

2014-04-29 Thread Simon Horman
On Tue, Apr 29, 2014 at 12:40:18AM -0700, Andy Zhou wrote: If p7 and p37 are now connected together as patch ports, would any traffic injected from p7 bypass (in the user space) the bond interfaces all-together? I believe what happens is that the normal action forwards the packet to all ports

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: restore bond rebalance for non-recirc bond

2014-04-29 Thread Simon Horman
On Thu, Apr 24, 2014 at 10:34:15PM -0700, Andy Zhou wrote: Bond rebalancing was disabled for bonds not using recirculation. The patch fixes this bug. While fixing the bug, the bond_rebalance() was also restructured slightly to move bond related logic back into ofproto/bond.c

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: restore bond rebalance for non-recirc bond

2014-04-29 Thread Andy Zhou
Good catch. Thanks for pointing it out. I will send out patch to fix this. On Tue, Apr 29, 2014 at 2:14 AM, Simon Horman ho...@verge.net.au wrote: On Thu, Apr 24, 2014 at 10:34:15PM -0700, Andy Zhou wrote: Bond rebalancing was disabled for bonds not using recirculation. The patch fixes this

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: restore bond rebalance for non-recirc bond

2014-04-29 Thread Simon Horman
Thanks. On Tue, Apr 29, 2014 at 02:30:26AM -0700, Andy Zhou wrote: Good catch. Thanks for pointing it out. I will send out patch to fix this. On Tue, Apr 29, 2014 at 2:14 AM, Simon Horman ho...@verge.net.au wrote: On Thu, Apr 24, 2014 at 10:34:15PM -0700, Andy Zhou wrote: Bond rebalancing

[ovs-dev] [PATCH v4] ofproto: per-table statistics

2014-04-29 Thread Simon Horman
Add per-table counters. This resolves some short-comings in the data provided in a table stats reply message. * Lookups and matches are calculated based on table accesses rather than datapath flow hits and misses. * Lookups and matches are credited to the table where they occurred rather

Re: [ovs-dev] [PATCH] netdev-linux: favor netlink stats for physical ports

2014-04-29 Thread Ben Pfaff
On Mon, Apr 28, 2014 at 03:58:51PM -0700, Andy Zhou wrote: Currently physical ports stats are collected from kernel datapath. However, those counter do not reflect actual wire packet counters when LSO or TSO are enabled by the NIC. In the meantime, the stats collected form routing stack does.

Re: [ovs-dev] [PATCH] Revert Prepare for 2.1.2.

2014-04-29 Thread Ben Pfaff
On Mon, Apr 28, 2014 at 10:39:27PM -0700, Justin Pettit wrote: This reverts commit 82e413df because bug fix bf52ed4 (datapath: Check for backported skb_orphan_frags().) was required. Signed-off-by: Justin Pettit jpet...@nicira.com Acked-by: Ben Pfaff b...@nicira.com

Re: [ovs-dev] [PATCH 1/2] dpif-linux: Fix a bug in creating port.

2014-04-29 Thread Ben Pfaff
On Mon, Apr 28, 2014 at 11:53:51PM -0700, Alex Wang wrote: Based on the policy of 'OVS_VPORT_ATTR_UPCALL_PID', if upcall should not be sent to userspace (i.e. the number of handler threads is zero), the netlink message for creating vport should be an one-element array of value 0. However,

Re: [ovs-dev] [PATCH 2/2] netdev: Fix an use of uninitialized mutex.

2014-04-29 Thread Ben Pfaff
On Mon, Apr 28, 2014 at 11:53:52PM -0700, Alex Wang wrote: Commit 05bf6d3c62e1d (ovs-thread: Add checking for mutex and rwlock initialization.) helps find an use of uninitialized mutex (netdev_class_mutex) during upgrade. The assertion check aborts the ovs. This commit fixes the issue by

Re: [ovs-dev] [PATCH v3] Rapid Spanning Protocol Implementation (IEEE 802.1D) + functional tests

2014-04-29 Thread Martino Fornasa
Jarno Rajahalme wrote: Another high-level thing is that in OVS we use the ‘ovs_beXX’ types to annotate integers in network byte order, and the corresponding ‘uintXX_t’ types for the host byte order equivalents. You would use ovs_beXX types to define the BPDUs, and then convert each member to

Re: [ovs-dev] [PATCH v4] ofproto: per-table statistics

2014-04-29 Thread Ben Pfaff
On Tue, Apr 29, 2014 at 06:34:22PM +0900, Simon Horman wrote: Add per-table counters. This resolves some short-comings in the data provided in a table stats reply message. * Lookups and matches are calculated based on table accesses rather than datapath flow hits and misses. * Lookups

[ovs-dev] enable OF1.1-OF1.3 by default?

2014-04-29 Thread Ben Pfaff
Looking through OPENFLOW-1.1+, Open vSwitch is missing only one feature that is required for OpenFlow 1.1, 1.2, or 1.3, which is: * VLANs tagged with 88a8 Ethertype. This requires kernel work for reasonable performance. [required for OF1.1+] I'm proposing that we ignore this for

Re: [ovs-dev] [PATCH 2/2] netdev: Fix an use of uninitialized mutex.

2014-04-29 Thread Alex Wang
applied and backported, thx, On Tue, Apr 29, 2014 at 7:39 AM, Ben Pfaff b...@nicira.com wrote: On Mon, Apr 28, 2014 at 11:53:52PM -0700, Alex Wang wrote: Commit 05bf6d3c62e1d (ovs-thread: Add checking for mutex and rwlock initialization.) helps find an use of uninitialized mutex

Re: [ovs-dev] [PATCH v4 1/3] Add basic implementation for OpenFlow 1.4 bundles

2014-04-29 Thread Ben Pfaff
On Wed, Apr 23, 2014 at 02:03:56PM +0300, Alexandru Copot wrote: This is only the communication part of the bundles functionality. The actual message pre-validation and commits are not implemented. Signed-off-by: Alexandru Copot alex.miha...@gmail.com Thanks for the new revision. I think

Re: [ovs-dev] [PATCH v4 2/3] tests: add some OpenFlow 1.4 bundles tests

2014-04-29 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 09:32:00PM +0300, Alexandru Copot wrote: Signed-off-by: Alexandru Copot alex.miha...@gmail.com Cc: Daniel Baluta dbal...@ixiacom.com I would fold these into patch 1. ___ dev mailing list dev@openvswitch.org

Re: [ovs-dev] [PATCH v4 3/3] ofp-print: Enable printing OF1.4 version

2014-04-29 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 09:32:01PM +0300, Alexandru Copot wrote: Also fix some tests that can now properly print packets with the new protocol version. Signed-off-by: Alexandru Copot alex.miha...@gmail.com Cc: Daniel Baluta dbal...@ixiacom.com Looks fine, thanks, I'll wait for the new

Re: [ovs-dev] [PATCH v3] Rapid Spanning Protocol Implementation (IEEE 802.1D) + functional tests

2014-04-29 Thread Jarno Rajahalme
On Apr 29, 2014, at 7:40 AM, Martino Fornasa m...@fornasa.it wrote: Jarno Rajahalme wrote: Also, we have defined the type ‘stp_identifier’ in lib/stp.h. I’d like you to use it (with the accompanying formatting tools) also for RSTP (maybe move them to lib/util.h to use them both from STP

Re: [ovs-dev] [PATCH] netdev-linux: favor netlink stats for physical ports

2014-04-29 Thread Jarno Rajahalme
On Apr 28, 2014, at 3:58 PM, Andy Zhou az...@nicira.com wrote: Currently physical ports stats are collected from kernel datapath. However, those counter do not reflect actual wire packet counters when LSO or TSO are enabled by the NIC. In the meantime, the stats collected form routing stack

Re: [ovs-dev] [PATCH 09/10] lib/flow: Maintain miniflow offline values explicitly.

2014-04-29 Thread Jarno Rajahalme
On Apr 19, 2014, at 10:09 PM, Kmindg G kmi...@gmail.com wrote: On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: /* This is useful for initializing a miniflow for a miniflow_extract() call. */ static inline void miniflow_initialize(struct miniflow *mf,

Re: [ovs-dev] Userspace Netlink MMAP status

2014-04-29 Thread Zoltan Kiss
On 23/04/14 22:56, Thomas Graf wrote: On 04/23/2014 10:12 PM, Ethan Jackson wrote: The problem has actually gotten worse since we've gotten rid of the dispatcher thread. Now each thread has it's own channel per port. I wonder if the right approach is to simply ditch the per-port fairness in

Re: [ovs-dev] enable OF1.1-OF1.3 by default?

2014-04-29 Thread Justin Pettit
On April 29, 2014 at 7:53:21 AM, Ben Pfaff (b...@nicira.com) wrote: Looking through OPENFLOW-1.1+, Open vSwitch is missing only one feature that is required for OpenFlow 1.1, 1.2, or 1.3, which is: * VLANs tagged with 88a8 Ethertype. This requires kernel work for reasonable performance.

Re: [ovs-dev] Userspace Netlink MMAP status

2014-04-29 Thread Thomas Graf
On Tue, Apr 29, 2014 at 05:17:07PM +0100, Zoltan Kiss wrote: On 23/04/14 22:56, Thomas Graf wrote: On 04/23/2014 10:12 PM, Ethan Jackson wrote: The problem has actually gotten worse since we've gotten rid of the dispatcher thread. Now each thread has it's own channel per port. I wonder if

Re: [ovs-dev] enable OF1.1-OF1.3 by default?

2014-04-29 Thread Thomas F Herbert
On 4/29/2014 10:53 AM, Ben Pfaff wrote: Looking through OPENFLOW-1.1+, Open vSwitch is missing only one feature that is required for OpenFlow 1.1, 1.2, or 1.3, which is: * VLANs tagged with 88a8 Ethertype. This requires kernel work for reasonable performance. [required for

Re: [ovs-dev] enable OF1.1-OF1.3 by default?

2014-04-29 Thread Ben Pfaff
On Tue, Apr 29, 2014 at 12:48:49PM -0400, Thomas F Herbert wrote: On 4/29/2014 10:53 AM, Ben Pfaff wrote: Looking through OPENFLOW-1.1+, Open vSwitch is missing only one feature that is required for OpenFlow 1.1, 1.2, or 1.3, which is: * VLANs tagged with 88a8 Ethertype. This requires

Re: [ovs-dev] [PATCH] netdev-linux: favor netlink stats for physical ports

2014-04-29 Thread Pravin Shelar
On Tue, Apr 29, 2014 at 7:33 AM, Ben Pfaff b...@nicira.com wrote: On Mon, Apr 28, 2014 at 03:58:51PM -0700, Andy Zhou wrote: Currently physical ports stats are collected from kernel datapath. However, those counter do not reflect actual wire packet counters when LSO or TSO are enabled by the

[ovs-dev] [PATCH] bridge: Allow users to configure statistics update to OVSDB.

2014-04-29 Thread Alex Wang
This commit adds a new configuration stats-update-interval in other_config of Open_Vswitch table. So users can control the statistics update frequency. A possible use case is that, users can lower the update frequency to reduce the cpu consumption of the ovs-vswitchd thread. Signed-off-by: Alex

Re: [ovs-dev] [PATCH 1/2] ofproto-bond: do not allow recirculation when we failed to allocate recirc_id

2014-04-29 Thread Andy Zhou
Thanks for the review. Pushed both patches. On Mon, Apr 28, 2014 at 3:57 PM, Ben Pfaff b...@nicira.com wrote: On Thu, Apr 24, 2014 at 10:34:14PM -0700, Andy Zhou wrote: When recirc pool is exhausted, a new bond won't be allocate a new recirc_id. The bond-recirc_id will remain zero. This

Re: [ovs-dev] [PATCH V2 3/4] datapath: Convert mask list in mask array.

2014-04-29 Thread Pravin Shelar
On Wed, Apr 23, 2014 at 3:26 PM, Thomas Graf tg...@redhat.com wrote: On 04/23/2014 05:49 PM, Pravin B Shelar wrote: mask caches index of mask in mask_list. On packet recv OVS need to traverse mask-list to get cached mask. Therefore array is better for retrieving cached mask. This also

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-29 Thread Jarno Rajahalme
On Apr 21, 2014, at 6:08 PM, YAMAMOTO Takashi yamam...@valinux.co.jp wrote: On Apr 20, 2014, at 7:49 PM, YAMAMOTO Takashi yamam...@valinux.co.jp wrote: +hash = mhash_finish(hash, 13); /* No need to match byte length here. */ is it worth being special? I知 not exactly sure

[ovs-dev] [PATCH V3] ofproto-dpif-monitor: Fix deadlock.

2014-04-29 Thread Alex Wang
Commit 6b59b543 (ovs-thread: Use fair (but nonrecursive) rwlocks on glibc.) changed the rwlocks to nonrecursive, writer-biased lock. It also made the following deadlock possible. Assume BFD is used on both end of a link. Consider the following events: 1. Handler at one end received the BFD

Re: [ovs-dev] [PATCH V2 4/4] datapath: Compact mask list array.

2014-04-29 Thread Pravin Shelar
On Wed, Apr 23, 2014 at 3:38 PM, Thomas Graf tg...@redhat.com wrote: On 04/23/2014 05:49 PM, Pravin B Shelar wrote: Along with flow-table rehashing OVS can compact masks array. This allows us to calculate highest index for mask array. Signed-off-by: Pravin B Shelar pshe...@nicira.com

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 5:15 PM, Ethan Jackson et...@nicira.com wrote: In the commit message s/suppoort/support/ Out of curiosity why replace the miniflow_get inline functions with macros? I got tired of writing (or rather copypasting) the “offset of(struct flow, FIELD)”. The macro can take

Re: [ovs-dev] [PATCH v2.56] datapath: Add basic MPLS support to kernel

2014-04-29 Thread Jesse Gross
On Mon, Apr 28, 2014 at 5:13 PM, Simon Horman ho...@verge.net.au wrote: On Mon, Apr 28, 2014 at 02:37:47PM -0700, Jesse Gross wrote: On Mon, Apr 28, 2014 at 12:00 AM, Simon Horman ho...@verge.net.au wrote: On Fri, Apr 25, 2014 at 12:57:20PM -0700, Jesse Gross wrote: On Fri, Apr 25, 2014 at

Re: [ovs-dev] [PATCH 02/10] lib: Inline functions used in classifier_lookup

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 5:31 PM, Ethan Jackson et...@nicira.com wrote: The first line in the commit message needs a period. Thanks. As Yamamoto asked, please verify that this actually helps. If it doesn't I'd prefer not to merge it. This helps in the range of 1% in TCP_CRR performance

Re: [ovs-dev] [PATCH] netdev-linux: favor netlink stats for physical ports

2014-04-29 Thread Andy Zhou
On Tue, Apr 29, 2014 at 7:33 AM, Ben Pfaff b...@nicira.com wrote: On Mon, Apr 28, 2014 at 03:58:51PM -0700, Andy Zhou wrote: Currently physical ports stats are collected from kernel datapath. However, those counter do not reflect actual wire packet counters when LSO or TSO are enabled by the

Re: [ovs-dev] [PATCH] netdev-linux: favor netlink stats for physical ports

2014-04-29 Thread Andy Zhou
On Tue, Apr 29, 2014 at 8:35 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 28, 2014, at 3:58 PM, Andy Zhou az...@nicira.com wrote: Currently physical ports stats are collected from kernel datapath. However, those counter do not reflect actual wire packet counters when LSO or TSO

Re: [ovs-dev] [PATCH 04/10] lib/classifier: Hide more of the internal data structures.

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 5:40 PM, Ethan Jackson et...@nicira.com wrote: So it seems to me that the only data needed in struct classifier by callers is the fat_rwlock. What if we add a classifier_rdlock() and a classifier_wrlock() function. That done, we could entirely hide struct classifier,

Re: [ovs-dev] [PATCH 04/10] lib/classifier: Hide more of the internal data structures.

2014-04-29 Thread Ethan Jackson
Fine with me go ahead and push it. Ethan On Tue, Apr 29, 2014 at 12:40 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 24, 2014, at 5:40 PM, Ethan Jackson et...@nicira.com wrote: So it seems to me that the only data needed in struct classifier by callers is the fat_rwlock. What if

Re: [ovs-dev] Userspace Netlink MMAP status

2014-04-29 Thread Ethan Jackson
The common use case is a flow expiring during the lifetime of a TCP connection. It will result in multiple data packets being sent upwards. It's much less likely in the megaflows era though. I think this is pretty unlikely except in some extreme circumstances. For a flow to be removed from the

Re: [ovs-dev] [PATCH 06/10] lib: Add prefetch support (for GCC)

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 5:55 PM, Ethan Jackson et...@nicira.com wrote: I think there should be a comment explaining when to use prefetch vs prefetch_write. I certainly don't know off the top of my head. I wrote this based on GCC documentation: /* OVS_PREFETCH() can be used to instruct the CPU

[ovs-dev] [PATCH V3] datapath: Compact mask list array.

2014-04-29 Thread Pravin B Shelar
Along with flow-table rehashing OVS can compact masks array. This allows us to calculate highest index for mask array. Signed-off-by: Pravin B Shelar pshe...@nicira.com --- datapath/flow_table.c | 40 ++-- datapath/flow_table.h |2 +- 2 files changed,

Re: [ovs-dev] [PATCH 07/10] classifier: Use array for subtables instead of a list.

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 6:15 PM, Ethan Jackson et...@nicira.com wrote: In the cache_push_back function, you might consider using the x2nrealloc() function. I did not know this existed, thanks! Does this actually help? I've found we spend most of our time getting the memory for the rule, not

Re: [ovs-dev] [PATCH 08/10] lib/classifier: Separate cls_rule internals from the API.

2014-04-29 Thread Jarno Rajahalme
On Apr 28, 2014, at 3:55 PM, Ethan Jackson et...@nicira.com wrote: Acked-by: Ethan Jackson et...@nicira.com I don't really like the API we've ended up with here. But I think it's fine for now. As discussed offline, I intend to change it later. You mean you don’t like what happens

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: restore bond rebalance for non-recirc bond

2014-04-29 Thread Andy Zhou
I upgraded my clang from 3.4 to 3.5. Now I can also reproduce the warning message. On Tue, Apr 29, 2014 at 2:32 AM, Simon Horman ho...@verge.net.au wrote: Thanks. On Tue, Apr 29, 2014 at 02:30:26AM -0700, Andy Zhou wrote: Good catch. Thanks for pointing it out. I will send out patch to fix

[ovs-dev] [PATCH] bond: fix uninitialized use of use_recirc variable

2014-04-29 Thread Andy Zhou
Caught by clang-3.5. Reported-by: Simon Horman ho...@verge.net.au Signed-off-by: Andy Zhou az...@nicira.com --- ofproto/bond.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index f5a9d47..c1a8448 100644 --- a/ofproto/bond.c +++

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-29 Thread Jarno Rajahalme
On Apr 28, 2014, at 7:07 PM, Ethan Jackson et...@nicira.com wrote: The comment of miniflow_and_mask_matches_flow() need to be reworded. Do we really need that function? Is it really that much faster? Having two functions which do the exact same thing is a bit confusing. The almost

Re: [ovs-dev] [PATCH] ofp-version-opt: Fix spelling and capitalization.

2014-04-29 Thread Justin Pettit
Acked-by: Justin Pettit jpet...@nicira.com On April 29, 2014 at 1:48:23 PM, Ben Pfaff (b...@nicira.com) wrote: OpenFlow is one word. Version isn't a proper noun. Signed-off-by: Ben Pfaff --- lib/ofp-version-opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[ovs-dev] [PATCH] ofp-version-opt: Fix spelling and capitalization.

2014-04-29 Thread Ben Pfaff
OpenFlow is one word. Version isn't a proper noun. Signed-off-by: Ben Pfaff b...@nicira.com --- lib/ofp-version-opt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ofp-version-opt.c b/lib/ofp-version-opt.c index 10784fc..46fb45a 100644 --- a/lib/ofp-version-opt.c

[ovs-dev] [PATCH] Enable OpenFlow 1.0, 1.1, 1.2, and 1.3 by default.

2014-04-29 Thread Ben Pfaff
The Open vSwitch software switch now supports all the required features of OpenFlow 1.0 through 1.3, with one known trivial exception[*]. Enable them by default in ovs-vswitchd. For now, ovs-ofctl only enables OpenFlow 1.0 by default. This is because ovs-ofctl implements command such as

Re: [ovs-dev] [PATCH] ofp-version-opt: Fix spelling and capitalization.

2014-04-29 Thread Ben Pfaff
Thanks, applied to master. On Tue, Apr 29, 2014 at 01:49:15PM -0700, Justin Pettit wrote: Acked-by: Justin Pettit jpet...@nicira.com On April 29, 2014 at 1:48:23 PM, Ben Pfaff (b...@nicira.com) wrote: OpenFlow is one word. Version isn't a proper noun. Signed-off-by: Ben Pfaff

Re: [ovs-dev] enable OF1.1-OF1.3 by default?

2014-04-29 Thread Ben Pfaff
On Tue, Apr 29, 2014 at 07:53:09AM -0700, Ben Pfaff wrote: Looking through OPENFLOW-1.1+, Open vSwitch is missing only one feature that is required for OpenFlow 1.1, 1.2, or 1.3, which is: * VLANs tagged with 88a8 Ethertype. This requires kernel work for reasonable performance.

Re: [ovs-dev] [PATCH] bond: fix uninitialized use of use_recirc variable

2014-04-29 Thread Pritesh Kothari (pritkoth)
works for me here. Acked-by: Pritesh Kothari pritesh.koth...@cisco.com On Apr 29, 2014, at 1:22 PM, Andy Zhou az...@nicira.com wrote: Caught by clang-3.5. Reported-by: Simon Horman ho...@verge.net.au Signed-off-by: Andy Zhou az...@nicira.com --- ofproto/bond.c | 3 ++- 1 file changed, 2

Re: [ovs-dev] [PATCH 07/10] classifier: Use array for subtables instead of a list.

2014-04-29 Thread Ethan Jackson
Sounds good. Ethan On Tue, Apr 29, 2014 at 12:58 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 24, 2014, at 6:15 PM, Ethan Jackson et...@nicira.com wrote: In the cache_push_back function, you might consider using the x2nrealloc() function. I did not know this existed, thanks!

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-29 Thread Ethan Jackson
The almost equivalent function miniflow_equal_flow_in_minimask() does not require the miniflow and minimask to have the same map, and it is slower for it. However, it is only used by the test-classifier.c, so one option to reduce the confusion would be to move it there. What do you think?

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-29 Thread Ethan Jackson
Meh I changed my mind again. Just merge the series instead of holding back, I'll make my tweaks on top of master. Ethan On Tue, Apr 29, 2014 at 2:34 PM, Ethan Jackson et...@nicira.com wrote: The almost equivalent function miniflow_equal_flow_in_minimask() does not require the miniflow and

[ovs-dev] [PATCH] tests: Whitelist messages about RCU blocking in the testsuite.

2014-04-29 Thread Ben Pfaff
In production these may indicate a bug, but in the testsuite they probably just indicate a time-warp. Reported-by: Alex Wang al...@nicira.com Signed-off-by: Ben Pfaff b...@nicira.com --- tests/ofproto-macros.at |1 + 1 file changed, 1 insertion(+) diff --git a/tests/ofproto-macros.at

[ovs-dev] [PATCH] ovs-rcu: Log the name of the main thread as main instead of .

2014-04-29 Thread Ben Pfaff
The main thread has the empty string as its name, but that's not a good log string. Without this patch we can get log message like blocked 1000 ms waiting for to quiesce from ovsrcu_synchronize(). Signed-off-by: Ben Pfaff b...@nicira.com --- lib/ovs-rcu.c |4 +++- 1 file changed, 3

Re: [ovs-dev] [PATCH] ovs-rcu: Log the name of the main thread as main instead of .

2014-04-29 Thread Alex Wang
Acked-by: Alex Wang al...@nicira.com On Tue, Apr 29, 2014 at 2:44 PM, Ben Pfaff b...@nicira.com wrote: The main thread has the empty string as its name, but that's not a good log string. Without this patch we can get log message like blocked 1000 ms waiting for to quiesce from

Re: [ovs-dev] [PATCH] ofproto: Inline actions in struct rule_actions.

2014-04-29 Thread Ben Pfaff
On Fri, Apr 25, 2014 at 08:49:10AM -0700, Jarno Rajahalme wrote: Allocate struct rule_actions and the space for the actions at once. This reduces one memory indirection and helps reduce cache misses visible in perf annotations. Fix some old comments referring to ref count, since we now use

Re: [ovs-dev] [PATCH] ofproto: Inline trivial functions.

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 9:18 AM, Ben Pfaff b...@nicira.com wrote: On Thu, Apr 24, 2014 at 09:09:03AM -0700, Jarno Rajahalme wrote: rule_dpif_is_internal is among the top ten OVS internal functions in recent perf reports. Inline it and some other equally trivial functions. This change removes

Re: [ovs-dev] [PATCH] tests: Whitelist messages about RCU blocking in the testsuite.

2014-04-29 Thread Alex Wang
Tested, worked, Thanks for fixing this, reminder: need backport, (maybe both patches) Acked-by: Alex Wang al...@nicira.com On Tue, Apr 29, 2014 at 2:40 PM, Ben Pfaff b...@nicira.com wrote: In production these may indicate a bug, but in the testsuite they probably just indicate a time-warp.

Re: [ovs-dev] [PATCH] ofproto: Inline trivial functions.

2014-04-29 Thread Jarno Rajahalme
On Apr 29, 2014, at 2:55 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 24, 2014, at 9:18 AM, Ben Pfaff b...@nicira.com wrote: On Thu, Apr 24, 2014 at 09:09:03AM -0700, Jarno Rajahalme wrote: rule_dpif_is_internal is among the top ten OVS internal functions in recent perf

Re: [ovs-dev] [PATCH] ofproto: Inline trivial functions.

2014-04-29 Thread Ben Pfaff
On Tue, Apr 29, 2014 at 03:01:47PM -0700, Jarno Rajahalme wrote: On Apr 29, 2014, at 2:55 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 24, 2014, at 9:18 AM, Ben Pfaff b...@nicira.com wrote: On Thu, Apr 24, 2014 at 09:09:03AM -0700, Jarno Rajahalme wrote:

Re: [ovs-dev] [PATCH] tests: Whitelist messages about RCU blocking in the testsuite.

2014-04-29 Thread Ben Pfaff
I pushed both. Thanks for the reminder about backporting. I backported both of them. On Tue, Apr 29, 2014 at 02:55:24PM -0700, Alex Wang wrote: Tested, worked, Thanks for fixing this, reminder: need backport, (maybe both patches) Acked-by: Alex Wang al...@nicira.com On Tue, Apr

[ovs-dev] [PATCH v6] datapath: Add support for kernel 3.14.

2014-04-29 Thread Pritesh Kothari
Signed-off-by: Pritesh Kothari pritesh.koth...@cisco.com --- v6: rebase for changes in datapath/datapath.c v5: move skb_clear_rxhash() from compat.h to skbuff.h, simplify skb_get_hash() integration, fix random.h order in acinclude.m4, move pcpu_sw_netstats to netdevice.h. v4: rebase

[ovs-dev] two variables named 'flow'

2014-04-29 Thread Ben Pfaff
GCC is telling me that ovs_flow_tbl_lookup_stats() has two variables both named 'flow': datapath/linux/flow_table.c:580:40: warning: symbol 'flow' shadows an earlier one datapath/linux/flow_table.c:558:24: originally declared here If it's not a bug, it still seems worth fixing. Thanks,

Re: [ovs-dev] [PATCH] ofproto: Inline trivial functions.

2014-04-29 Thread Jarno Rajahalme
Pushed, thanks for the review! Jarno On Apr 29, 2014, at 3:11 PM, Ben Pfaff b...@nicira.com wrote: On Tue, Apr 29, 2014 at 03:01:47PM -0700, Jarno Rajahalme wrote: On Apr 29, 2014, at 2:55 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Apr 24, 2014, at 9:18 AM, Ben Pfaff

Re: [ovs-dev] [PATCH] ofproto: Inline actions in struct rule_actions.

2014-04-29 Thread Jarno Rajahalme
On Apr 29, 2014, at 2:51 PM, Ben Pfaff b...@nicira.com wrote: On Fri, Apr 25, 2014 at 08:49:10AM -0700, Jarno Rajahalme wrote: Allocate struct rule_actions and the space for the actions at once. This reduces one memory indirection and helps reduce cache misses visible in perf annotations.

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-29 Thread Jarno Rajahalme
Series pushed! Thanks for the review, Ethan! Jarno On Apr 29, 2014, at 2:35 PM, Ethan Jackson et...@nicira.com wrote: Meh I changed my mind again. Just merge the series instead of holding back, I'll make my tweaks on top of master. Ethan On Tue, Apr 29, 2014 at 2:34 PM, Ethan

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-29 Thread Jarno Rajahalme
On Apr 19, 2014, at 9:51 PM, Kmindg G kmi...@gmail.com wrote: On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: static struct cls_match * cls_match_alloc(struct cls_rule *rule) { -struct cls_match *cls_match = xmalloc(sizeof *cls_match); +int count =

Re: [ovs-dev] [PATCH 09/10] lib/flow: Maintain miniflow offline values explicitly.

2014-04-29 Thread Jarno Rajahalme
On Apr 28, 2014, at 7:17 PM, Kmindg G kmi...@gmail.com wrote: On Tue, Apr 29, 2014 at 9:43 AM, Ethan Jackson et...@nicira.com wrote: Acked-by: Ethan Jackson et...@nicira.com I'm not sure I totally follow Kmindg's comment, perhaps he could explain further? At any rate, once addressed Im

[ovs-dev] [PATCH V2 1/2] cfm: Require ccm received in demand mode.

2014-04-29 Thread Alex Wang
This commit adds a new requirement that cfm session must receive at least one ccm every 100 * cfm_interval amount of time in demand mode. Otherwise, even if the data packets are received on the monitored interface, the cfm session still reports [recv] fault. Since the datapath flow is not purged

[ovs-dev] [PATCH V2 2/2] bfd: Require bfd control packet received in forwarding_if_rx mode.

2014-04-29 Thread Alex Wang
This commit adds a requirement that bfd session must receive at least one bfd control packet every 100 * bfd-cfg_min_rx amount of time in forwarding_if_rx mode. Otherwise, even if the data packets are received on the monitored interface, the bfd-forwarding is still false. Since the datapath flow

[ovs-dev] [PATCH] datapath: Remove unnecessary flow variable.

2014-04-29 Thread Pravin B Shelar
Patch fixes following warning: datapath/linux/flow_table.c:580:40: warning: symbol 'flow' shadows an earlier one datapath/linux/flow_table.c:558:24: originally declared here Reported-by: Ben Pfaff b...@nicira.com Signed-off-by: Pravin B Shelar pshe...@nicira.com --- datapath/flow_table.c |1

Re: [ovs-dev] two variables named 'flow'

2014-04-29 Thread Pravin Shelar
Thanks. Sent a fix. On Tue, Apr 29, 2014 at 3:28 PM, Ben Pfaff b...@nicira.com wrote: GCC is telling me that ovs_flow_tbl_lookup_stats() has two variables both named 'flow': datapath/linux/flow_table.c:580:40: warning: symbol 'flow' shadows an earlier one

Re: [ovs-dev] [PATCH] bridge: Allow users to configure statistics update to OVSDB.

2014-04-29 Thread Joe Stringer
On 30 April 2014 05:29, Alex Wang al...@nicira.com wrote: +dnl disable the stats update, the following 'recv' should not be updated. +AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=1000]) +for i in `seq 0 10`; do ovs-appctl time/warp 1000; done +for i in `seq 1 5`; do +

Re: [ovs-dev] [PATCH] bridge: Allow users to configure statistics update to OVSDB.

2014-04-29 Thread Alex Wang
Thanks for the review Joe, On Tue, Apr 29, 2014 at 4:45 PM, Joe Stringer joestrin...@nicira.comwrote: On 30 April 2014 05:29, Alex Wang al...@nicira.com wrote: +dnl disable the stats update, the following 'recv' should not be updated. +AT_CHECK([ovs-vsctl set O .

[ovs-dev] [PATCH V2] bridge: Allow users to configure statistics update to OVSDB.

2014-04-29 Thread Alex Wang
This commit adds a new configuration stats-update-interval in other_config of Open_Vswitch table. So users can control the statistics update frequency. A possible use case is that, users can lower the update frequency to reduce the cpu consumption of the ovs-vswitchd thread. The configured

Re: [ovs-dev] [PATCH v4] ofproto: per-table statistics

2014-04-29 Thread YAMAMOTO Takashi
On Tue, Apr 29, 2014 at 06:34:22PM +0900, Simon Horman wrote: Add per-table counters. This resolves some short-comings in the data provided in a table stats reply message. * Lookups and matches are calculated based on table accesses rather than datapath flow hits and misses. * Lookups

Re: [ovs-dev] [PATCH] Enable OpenFlow 1.0, 1.1, 1.2, and 1.3 by default.

2014-04-29 Thread YAMAMOTO Takashi
The Open vSwitch software switch now supports all the required features of OpenFlow 1.0 through 1.3, with one known trivial exception[*]. Enable them by default in ovs-vswitchd. For now, ovs-ofctl only enables OpenFlow 1.0 by default. This is because ovs-ofctl implements command such as

[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix in_port=controller case for NORMAL action

2014-04-29 Thread YAMAMOTO Takashi
The problem mentioned by Simon Horman in the following mail. http://openvswitch.org/pipermail/dev/2014-April/039492.html Cc: Simon Horman ho...@verge.net.au Signed-off-by: YAMAMOTO Takashi yamam...@valinux.co.jp --- ofproto/ofproto-dpif-xlate.c | 7 --- 1 file changed, 4 insertions(+), 3

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix in_port=controller case for NORMAL action

2014-04-29 Thread Ben Pfaff
On Wed, Apr 30, 2014 at 10:24:46AM +0900, YAMAMOTO Takashi wrote: The problem mentioned by Simon Horman in the following mail. http://openvswitch.org/pipermail/dev/2014-April/039492.html Cc: Simon Horman ho...@verge.net.au Signed-off-by: YAMAMOTO Takashi yamam...@valinux.co.jp One of the

Re: [ovs-dev] [PATCH] datapath: Remove unnecessary flow variable.

2014-04-29 Thread Jesse Gross
On Tue, Apr 29, 2014 at 4:34 PM, Pravin B Shelar pshe...@nicira.com wrote: Patch fixes following warning: datapath/linux/flow_table.c:580:40: warning: symbol 'flow' shadows an earlier one datapath/linux/flow_table.c:558:24: originally declared here Reported-by: Ben Pfaff b...@nicira.com

Re: [ovs-dev] [PATCH] bond: fix uninitialized use of use_recirc variable

2014-04-29 Thread Andy Zhou
Thanks for the review. Pushed. On Tue, Apr 29, 2014 at 2:13 PM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: works for me here. Acked-by: Pritesh Kothari pritesh.koth...@cisco.com On Apr 29, 2014, at 1:22 PM, Andy Zhou az...@nicira.com wrote: Caught by clang-3.5. Reported-by:

Re: [ovs-dev] [PATCH v2.56] datapath: Add basic MPLS support to kernel

2014-04-29 Thread Simon Horman
On Tue, Apr 29, 2014 at 11:41:57AM -0700, Jesse Gross wrote: On Mon, Apr 28, 2014 at 5:13 PM, Simon Horman ho...@verge.net.au wrote: On Mon, Apr 28, 2014 at 02:37:47PM -0700, Jesse Gross wrote: On Mon, Apr 28, 2014 at 12:00 AM, Simon Horman ho...@verge.net.au wrote: On Fri, Apr 25, 2014 at