Re: [ovs-dev] RFC: conntrack Initial Design

2014-05-22 Thread Justin Pettit
On May 22, 2014 at 2:13:09 PM, Jesse Gross (je...@nicira.com) wrote: > On Thu, May 22, 2014 at 2:06 PM, Justin Pettit wrote: > > On May 22, 2014 at 1:58:28 PM, Jesse Gross (je...@nicira.com) wrote: > >> On Thu, May 22, 2014 at 1:39 PM, Justin Pettit wrote: > > > >> Is it possible to make the zone a

Re: [ovs-dev] [PACKET_OUT v2] ofproto-dpif: treat non-datapath ports as local port for OFPT_PACKET_OUT

2014-05-22 Thread YAMAMOTO Takashi
>> On Wed, Apr 30, 2014 at 11:59 PM, YAMAMOTO Takashi >> wrote: > Something like this (I have not tested either scenario): > > I think this will fail to match but that may not be obvious to users: > packet_out: in_port=CONTROLLER actions=goto_table:1 > table 1: match=in_p

Re: [ovs-dev] [PATCH] upcall: Remove redundant xlate_actions_for_side_effects().

2014-05-22 Thread Murphy McCauley
On May 22, 2014, at 1:39 PM, Ben Pfaff wrote: > On Thu, May 22, 2014 at 10:57:19AM -0700, Ethan Jackson wrote: >> As a result of commit a0bab87 (ofproto: Remove per-flow miss hash >> table from upcall handler.) we're guaranteed that every packet has had >> xlate_actions() called on it at least on

Re: [ovs-dev] [PATCH] xcache: Remove unused field xc_entry.u.learn.ofproto.

2014-05-22 Thread Alex Wang
Acked-by: Alex Wang On Thu, May 22, 2014 at 9:35 PM, Joe Stringer wrote: > Signed-off-by: Joe Stringer > --- > ofproto/ofproto-dpif-xlate.c |2 -- > 1 file changed, 2 deletions(-) > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index a87db54..e0b10cb 100644

[ovs-dev] [PATCH] xcache: Remove unused field xc_entry.u.learn.ofproto.

2014-05-22 Thread Joe Stringer
Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-xlate.c |2 -- 1 file changed, 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index a87db54..e0b10cb 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -266,7 +266,6 @@

Re: [ovs-dev] unix domain socket permissions on freebsd

2014-05-22 Thread YAMAMOTO Takashi
> According to _Unix Network Programming_, only the umask controls the > permissions of a Unix domain socket created by bind(). This makes it > difficult to correctly control permissions on sockets in a > multithreaded process, since the umask is not thread-specific. > Therefore, currently bind_un

Re: [ovs-dev] [PATCH v4] ofproto-dpif-xlate: Implement RCU locking in ofproto-dpif-xlate.

2014-05-22 Thread Alex Wang
Hey Ben, Could you review it? Should be all ready, Thanks, Alex Wang, On Tue, May 20, 2014 at 11:19 AM, Ben Pfaff wrote: > On Tue, May 20, 2014 at 11:04 AM, Ryan Wilson 76511 > wrote: > > Per Alex's request, I ran a 10K internal port creation test (using > batches > > of 500 ports at a tim

[ovs-dev] [PATCH] ofproto: Fix uninitialized rule in ofproto_get_vlan_usage().

2014-05-22 Thread Ethan Jackson
Found by inspection. Signed-off-by: Ethan Jackson --- ofproto/ofproto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 63f65c3..356fcb1 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -7054,6 +7054,8 @@ ofproto_get_vlan_usage(struct of

[ovs-dev] [PATCH] lib/classifier: Simplify subtable array.

2014-05-22 Thread Ethan Jackson
From: Jarno Rajahalme Do not cache the 'tag' and 'max_priority' in the subtable array. This makes later changes to classifier easier. Change CLS_SUBTABLES_FOR_EACH to iterate with a regular array index. Makes the 'cls_subtables*' functions to always leave the subtables array in a consistent st

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

2014-05-22 Thread Simon Horman
On Thu, May 22, 2014 at 11:25:12AM -0700, Ben Pfaff wrote: > On Thu, May 22, 2014 at 02:44:36PM +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 tab

[ovs-dev] [PATCH 5/5] lib/cmap: Use atomics for all bucket data.

2014-05-22 Thread Jarno Rajahalme
The documentation of the memory order argument of atomic operations states that memory loads after an atomic load with a memory_order_acquire cannot be moved before the atomic operation. This still leaves open the possibility that non-atomic loads before the atomic load could be moved after it, hen

[ovs-dev] [PATCH 2/5] lib/flow: Use C99 declaration in for statement.

2014-05-22 Thread Jarno Rajahalme
C99 declarations within code are allowed now. Change the FLOW_FOR_EACH_IN_MAP to use loop variable within the for statement. This makes this macro more generally useful. The loop variable name is suffixed with two underscores with the intention that there would be a low likelihood of collision wi

[ovs-dev] [PATCH 4/5] lib/cmap: Add more hmap-like functionality.

2014-05-22 Thread Jarno Rajahalme
Add cmap_replace() and cmap_first(), as well as CMAP_FOR_EACH_SAFE and CMAP_FOR_EACH_CONTINUE to make porting existing hmap using code a bit easier. CMAP_FOR_EACH_SAFE is useful in RCU postponed destructors, when it is known that additional postponing is not needed. Signed-off-by: Jarno Rajahalme

[ovs-dev] [PATCH 3/5] lib/ovs-rcu: Fix documentation, add ovsrcu_init().

2014-05-22 Thread Jarno Rajahalme
lib/ovs-rcu.h had some of the comments duplicated. Add ovsrcu_init() that can be used like ovsrcu_set() when the RCU protected pointer is not yet visible any readers. Use OVS_CONSTRUCTOR to initialize the ovs-rcu module. Signed-off-by: Jarno Rajahalme --- lib/ovs-rcu.c | 46 +

[ovs-dev] [PATCH 1/5] CodingStyle: Allow C99 mixing of declarations and code.

2014-05-22 Thread Jarno Rajahalme
As even the MSVC 2013 now supports the C99 mixing of declarations and code, we can now allow them in OVS code. GCC (at least some versions of it) require the -std=c99 option to not issue warnings, and since we rely in GCC extensions when compiling with GCC, the option -std=gnu99 is now added to th

Re: [ovs-dev] [RFC 1/4] netlink: Support for memory mapped Netlink sockets

2014-05-22 Thread Ben Pfaff
On Fri, May 23, 2014 at 01:15:58AM +0200, Thomas Graf wrote: > Signed-off-by: Thomas Graf Thanks for the patches. Definitions in netlink-protocol.h have to be written from the perspective that we might be on a non-Linux host and compiling with a non-GCC compiler (in particular MSVC). The defini

Re: [ovs-dev] [PATCH 1/4] ofproto: Remove ofproto_group_write_lookup()

2014-05-22 Thread Andy Zhou
Thanks Ben and Ryan for the review. All 4 patches applied. On Thu, May 22, 2014 at 11:16 AM, Ryan Wilson 76511 wrote: > This is a much cleaner improvement, thanks! > > Acked-by: Ryan Wilson > > On 5/22/14 11:04 AM, "Andy Zhou" wrote: > >>ofproto_group_write_lookup() slightly different from >>of

Re: [ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

2014-05-22 Thread Jarno Rajahalme
On May 22, 2014, at 4:27 PM, Jarno Rajahalme wrote: >> I find myself wondering whether we could end up with a funny >> paradoxical mask, e.g. mark some bit of a TCP port as looked at even >> though we didn't mark the IP protocol as looked at. I am not sure >> whether this can happen or whether

Re: [ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

2014-05-22 Thread Jarno Rajahalme
On May 22, 2014, at 10:43 AM, Ben Pfaff wrote: > On Mon, May 19, 2014 at 12:35:46PM -0700, Jarno Rajahalme wrote: >> When, during a classifier lookup, we narrow down to a single potential >> rule, it is enough to match on ("unwildcard") one bit that differs >> between the packet and the rule. >>

Re: [ovs-dev] [RFC 0/4] Status of mmap upcall work

2014-05-22 Thread Thomas Graf
On 05/23/14 at 01:15am, Thomas Graf wrote: > Test: * Avg pps as reported by pktgen for a single pktgen thread > * qemu, vcpu=2, mem=2GB, megaflows disabled > > Orig [0] ZC [1]mmap [2] shared-ofpbuf [3] > 64B (linear)624K 564K 962K 900K > 1.5K (linea

[ovs-dev] [RFC 1/4] netlink: Support for memory mapped Netlink sockets

2014-05-22 Thread Thomas Graf
Signed-off-by: Thomas Graf --- lib/dpif-linux.c | 3 +- lib/netlink-protocol.h | 39 ++ lib/netlink-socket.c | 345 - lib/netlink-socket.h | 10 +- 4 files changed, 361 insertions(+), 36 deletions(-) diff --git a/lib/dpif-linux.c

[ovs-dev] [RFC 4/4] netlink: COW mmap Netlink messages to avoid memcpy()

2014-05-22 Thread Thomas Graf
If the message was received via a shared memory ring the frame is usable as ofpbuf base directly without copying the buffer unnecessarily. A new destructor() callback is introduced which allows marking the frame unused after the ofpbuf has been uninitialized. Signed-off-by: Thomas Graf --- lib/n

[ovs-dev] [RFC 3/4] upcall: Enable memory mapped Netlink sockets

2014-05-22 Thread Thomas Graf
--- lib/dpif-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 42a3f72..09f02b3 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -298,7 +298,7 @@ vport_create_socksp(uint32_t n_socks, int *error) size_t i; f

[ovs-dev] [RFC 0/4] Status of mmap upcall work

2014-05-22 Thread Thomas Graf
A quick status update and request for comments on the future direction of this work. Changes since last post (tl;dr) * Reduced ring size from 4M to 1M * Added proper handling for socket errors (EPOLLERR) * More benchmarking Numbers, first: Test: * Avg pps as reported by pktgen for a single

[ovs-dev] [RFC 2/4] nlmon: Enable memory mapped Netlink socket

2014-05-22 Thread Thomas Graf
Signed-off-by: Thomas Graf --- utilities/nlmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/nlmon.c b/utilities/nlmon.c index 99b060c..60eb100 100644 --- a/utilities/nlmon.c +++ b/utilities/nlmon.c @@ -47,7 +47,7 @@ main(int argc OVS_UNUSED, char *argv[]) s

Re: [ovs-dev] [PATCH v3 3/3] datapath: add layer 3 flow/port support

2014-05-22 Thread Jesse Gross
On Tue, May 20, 2014 at 9:27 PM, Lori Jakab wrote: > On 5/21/14, 4:10 AM, Jesse Gross wrote: >> >> On Tue, May 13, 2014 at 7:02 AM, Lorand Jakab wrote: >>> >>> Implementation of the pop_eth and push_eth actions in the kernel, and >>> layer 3 flow support. >>> >>> Signed-off-by: Lorand Jakab >> >

[ovs-dev] unix domain socket permissions on freebsd

2014-05-22 Thread Ben Pfaff
According to _Unix Network Programming_, only the umask controls the permissions of a Unix domain socket created by bind(). This makes it difficult to correctly control permissions on sockets in a multithreaded process, since the umask is not thread-specific. Therefore, currently bind_unix_socket(

Re: [ovs-dev] [PATCH v2] bridge: Add test that ports that disappear get added back to the datapath.

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 01:39:22PM -0700, Gurucharan Shetty wrote: > On Thu, May 22, 2014 at 9:36 AM, Ben Pfaff wrote: > > The test added in this commit would have caught the bug fixed by commit > > 96be8de595150 (bridge: When ports disappear from a datapath, add them > > back.). With that commit

Re: [ovs-dev] [PATCH v3 3/3] datapath: add layer 3 flow/port support

2014-05-22 Thread Ben Pfaff
On Tue, May 13, 2014 at 05:02:16PM +0300, Lorand Jakab wrote: > Implementation of the pop_eth and push_eth actions in the kernel, and > layer 3 flow support. > > Signed-off-by: Lorand Jakab "sparse" complains thus: /home/blp/ovs/_build/datapath/linux/flow_netlink.c:528:17: warning: expr

Re: [ovs-dev] [PATCH v3 2/3] userspace: add layer 3 flow and switching support

2014-05-22 Thread Ben Pfaff
On Tue, May 13, 2014 at 05:02:15PM +0300, Lorand Jakab wrote: > This commit relaxes the assumption that all packets have an Ethernet > header, and adds support for layer 3 flows. For each packet received on > the Linux kernel datapath the l2 and l3 members of struct ofpbuf are > intialized appropr

Re: [ovs-dev] RFC: conntrack Initial Design

2014-05-22 Thread Jesse Gross
On Thu, May 22, 2014 at 2:06 PM, Justin Pettit wrote: > On May 22, 2014 at 1:58:28 PM, Jesse Gross (je...@nicira.com) wrote: >> On Thu, May 22, 2014 at 1:39 PM, Justin Pettit wrote: > >> Is it possible to make the zone a register or accessible from a >> register? I realize that there is a differen

Re: [ovs-dev] RFC: conntrack Initial Design

2014-05-22 Thread Justin Pettit
On May 22, 2014 at 1:58:28 PM, Jesse Gross (je...@nicira.com) wrote: > On Thu, May 22, 2014 at 1:39 PM, Justin Pettit wrote: > Is it possible to make the zone a register or accessible from a > register? I realize that there is a difference in size but it seems > like it has the potential to make t

Re: [ovs-dev] RFC: conntrack Initial Design

2014-05-22 Thread Jesse Gross
On Thu, May 22, 2014 at 1:39 PM, Justin Pettit wrote: > Connection Tracking > --- > The new connection tracking action is defined as follows: > > /* Action structure for NXAST_CONNTRACK. > * > * Pass traffic to the connection tracker. If 'flags' is NXACF_RESUBMIT, >

Re: [ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 01:36:23PM -0700, Pravin Shelar wrote: > On Thu, May 22, 2014 at 1:23 PM, Ben Pfaff wrote: > > On Thu, May 22, 2014 at 11:50:59AM -0700, Pravin Shelar wrote: > >> On Thu, May 22, 2014 at 10:30 AM, Daniele Di Proietto > >> wrote: > >> > These patches remove struct hmap flow

[ovs-dev] RFC: conntrack Initial Design

2014-05-22 Thread Justin Pettit
Below, is a first cut of the design document I wrote for integrating with the connection tracker.  As I mentioned at my OpenStack presentation, I have a prototype that (largely) implements this, but it's not ready to be shared yet.   The goal is to have it in a released version of OVS by the end

Re: [ovs-dev] [PATCH v2] bridge: Add test that ports that disappear get added back to the datapath.

2014-05-22 Thread Gurucharan Shetty
On Thu, May 22, 2014 at 9:36 AM, Ben Pfaff wrote: > The test added in this commit would have caught the bug fixed by commit > 96be8de595150 (bridge: When ports disappear from a datapath, add them > back.). With that commit reverted, the new test fails. > > Signed-off-by: Ben Pfaff > Acked-by: Gu

Re: [ovs-dev] [PATCH] upcall: Remove redundant xlate_actions_for_side_effects().

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 10:57:19AM -0700, Ethan Jackson wrote: > As a result of commit a0bab87 (ofproto: Remove per-flow miss hash > table from upcall handler.) we're guaranteed that every packet has had > xlate_actions() called on it at least once. Therefore, there's no > need to re-xlate slow pa

Re: [ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Pravin Shelar
On Thu, May 22, 2014 at 1:23 PM, Ben Pfaff wrote: > On Thu, May 22, 2014 at 11:50:59AM -0700, Pravin Shelar wrote: >> On Thu, May 22, 2014 at 10:30 AM, Daniele Di Proietto >> wrote: >> > These patches remove struct hmap flow_table from dp_netdev. >> > A new function has been added to the classifi

Re: [ovs-dev] [PATCH v3 1/3] userspace: add support for pop_eth and push_eth actions

2014-05-22 Thread Lori Jakab
On 5/22/14, 9:45 PM, Jesse Gross wrote: On Thu, May 22, 2014 at 11:34 AM, Ben Pfaff wrote: On Tue, May 13, 2014 at 05:02:14PM +0300, Lorand Jakab wrote: These actions will allow L2->L3 and L3->L2 switching, and are supposed to be added to flows installed in the datapath transparently by ovs-v

Re: [ovs-dev] [PATCH v3 1/3] userspace: add support for pop_eth and push_eth actions

2014-05-22 Thread Lori Jakab
On 5/22/14, 9:34 PM, Ben Pfaff wrote: On Tue, May 13, 2014 at 05:02:14PM +0300, Lorand Jakab wrote: These actions will allow L2->L3 and L3->L2 switching, and are supposed to be added to flows installed in the datapath transparently by ovs-vswitchd. Signed-off-by: Lorand Jakab This appears to

Re: [ovs-dev] [PATCH 4/4] ofproto-dpif-xlate: Coding style fix for bucket_is_alive()

2014-05-22 Thread Andy Zhou
On Thu, May 22, 2014 at 11:16 AM, Ben Pfaff wrote: > On Thu, May 22, 2014 at 11:04:41AM -0700, Andy Zhou wrote: >> Signed-off-by: Andy Zhou > > I usually put an outer set of parentheses on multiline expressions. Thanks for mentioning this. Plan to push with the following incremental. diff --git

Re: [ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 11:50:59AM -0700, Pravin Shelar wrote: > On Thu, May 22, 2014 at 10:30 AM, Daniele Di Proietto > wrote: > > These patches remove struct hmap flow_table from dp_netdev. > > A new function has been added to the classifier interface > > (classifier_at_position). Given the com

Re: [ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 01:17:31PM -0700, Gurucharan Shetty wrote: > On Thu, May 22, 2014 at 10:43 AM, Ben Pfaff wrote: > > On Mon, May 19, 2014 at 12:35:46PM -0700, Jarno Rajahalme wrote: > >> When, during a classifier lookup, we narrow down to a single potential > >> rule, it is enough to match

Re: [ovs-dev] Bug#701760: [PATCH] debian: Stop openvswitch after VMs managed by libvirt.

2014-05-22 Thread Ansis Atteka
I haven't looked into Debian, but I have Ubuntu 14.04 with libvirt 1.2.1: aatteka@aatteka-MacBookPro:~$ service libvirt-bin Usage: /etc/init.d/libvirt-bin COMMAND aatteka@aatteka-MacBookPro:~$ service libvirt-guests libvirt-guests: unrecognized service As you can see from output above my Ubuntu sy

Re: [ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

2014-05-22 Thread Gurucharan Shetty
On Thu, May 22, 2014 at 10:43 AM, Ben Pfaff wrote: > On Mon, May 19, 2014 at 12:35:46PM -0700, Jarno Rajahalme wrote: >> When, during a classifier lookup, we narrow down to a single potential >> rule, it is enough to match on ("unwildcard") one bit that differs >> between the packet and the rule.

Re: [ovs-dev] [PATCH v3 2/3] userspace: add layer 3 flow and switching support

2014-05-22 Thread Ben Pfaff
On Tue, May 13, 2014 at 05:02:15PM +0300, Lorand Jakab wrote: > diff --git a/lib/flow.c b/lib/flow.c > index 9c9adc5..2b87309 100644 > --- a/lib/flow.c > +++ b/lib/flow.c > @@ -121,7 +121,7 @@ struct mf_ctx { > * away. Some GCC versions gave warnigns on ALWAYS_INLINE, so these are > * defined

Re: [ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Pravin Shelar
On Thu, May 22, 2014 at 10:30 AM, Daniele Di Proietto wrote: > These patches remove struct hmap flow_table from dp_netdev. > A new function has been added to the classifier interface > (classifier_at_position). Given the complexity added by this call, which has > to expose part of the classifier

Re: [ovs-dev] [PATCH v3 1/3] userspace: add support for pop_eth and push_eth actions

2014-05-22 Thread Jesse Gross
On Thu, May 22, 2014 at 11:34 AM, Ben Pfaff wrote: > On Tue, May 13, 2014 at 05:02:14PM +0300, Lorand Jakab wrote: >> These actions will allow L2->L3 and L3->L2 switching, and are supposed >> to be added to flows installed in the datapath transparently by >> ovs-vswitchd. >> >> Signed-off-by: Lora

Re: [ovs-dev] [PATCH v3 1/3] userspace: add support for pop_eth and push_eth actions

2014-05-22 Thread Ben Pfaff
On Tue, May 13, 2014 at 05:02:14PM +0300, Lorand Jakab wrote: > These actions will allow L2->L3 and L3->L2 switching, and are supposed > to be added to flows installed in the datapath transparently by > ovs-vswitchd. > > Signed-off-by: Lorand Jakab This appears to renumber some existing OVS_ACTI

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

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 02:44:36PM +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. > > * Loo

Re: [ovs-dev] [PATCH 3/4] ofproto-dpif-xlate: Simplify group_is_alive

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 11:04:40AM -0700, Andy Zhou wrote: > Signed-off-by: Andy Zhou Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 2/4] ofproto-dpif: remove a redundant assignment

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 11:04:39AM -0700, Andy Zhou wrote: > Signed-off-by: Andy Zhou Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 1/4] ofproto: Remove ofproto_group_write_lookup()

2014-05-22 Thread Ryan Wilson 76511
This is a much cleaner improvement, thanks! Acked-by: Ryan Wilson On 5/22/14 11:04 AM, "Andy Zhou" wrote: >ofproto_group_write_lookup() slightly different from >ofproto_group_lookup() in handling reference counting. >Currently, it has only one caller: modify_group(). >It seems the abstraction

Re: [ovs-dev] [PATCH 1/4] ofproto: Remove ofproto_group_write_lookup()

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 11:04:38AM -0700, Andy Zhou wrote: > ofproto_group_write_lookup() slightly different from > ofproto_group_lookup() in handling reference counting. > Currently, it has only one caller: modify_group(). > It seems the abstraction is not adding value here. > > Remove the functi

Re: [ovs-dev] [PATCH 4/4] ofproto-dpif-xlate: Coding style fix for bucket_is_alive()

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 11:04:41AM -0700, Andy Zhou wrote: > Signed-off-by: Andy Zhou I usually put an outer set of parentheses on multiline expressions. Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listi

Re: [ovs-dev] [PATCH v2 1/3] classifier: added classifier_at_position() for dumps

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 10:13:22AM -0700, Daniele Di Proietto wrote: > The new function mimics the semantics of 'hmap''s hmap_at_position(). > It can be used to iterate through the classifier's rules when locking can't > be used > > Signed-off-by: Daniele Di Proietto Jarno, would you mind review

[ovs-dev] [PATCH 3/4] ofproto-dpif-xlate: Simplify group_is_alive

2014-05-22 Thread Andy Zhou
Signed-off-by: Andy Zhou --- ofproto/ofproto-dpif-xlate.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 93998fb..67b7017 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xla

[ovs-dev] [PATCH 2/4] ofproto-dpif: remove a redundant assignment

2014-05-22 Thread Andy Zhou
Signed-off-by: Andy Zhou --- ofproto/ofproto-dpif.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index ab56728..460f5e1 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3653,7 +3653,6 @@ group_dpif_lookup(struct ofproto_dpi

[ovs-dev] [PATCH 4/4] ofproto-dpif-xlate: Coding style fix for bucket_is_alive()

2014-05-22 Thread Andy Zhou
Signed-off-by: Andy Zhou --- ofproto/ofproto-dpif-xlate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 67b7017..5b0791f 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c

[ovs-dev] [PATCH 1/4] ofproto: Remove ofproto_group_write_lookup()

2014-05-22 Thread Andy Zhou
ofproto_group_write_lookup() slightly different from ofproto_group_lookup() in handling reference counting. Currently, it has only one caller: modify_group(). It seems the abstraction is not adding value here. Remove the function, along with some refactoring, makes modify_group() easier to underst

Re: [ovs-dev] [PATCH] upcall: Remove redundant xlate_actions_for_side_effects().

2014-05-22 Thread Ben Pfaff
[Adding Murphy] On Thu, May 22, 2014 at 10:57:19AM -0700, Ethan Jackson wrote: > As a result of commit a0bab87 (ofproto: Remove per-flow miss hash > table from upcall handler.) we're guaranteed that every packet has had > xlate_actions() called on it at least once. Therefore, there's no > need to

[ovs-dev] [PATCH] upcall: Remove redundant xlate_actions_for_side_effects().

2014-05-22 Thread Ethan Jackson
As a result of commit a0bab87 (ofproto: Remove per-flow miss hash table from upcall handler.) we're guaranteed that every packet has had xlate_actions() called on it at least once. Therefore, there's no need to re-xlate slow path flows just to shove their packets through the system. This also may

Re: [ovs-dev] [PATCH v2 2/2] lib/classifier: Optimize megaflows for single rule case.

2014-05-22 Thread Ben Pfaff
On Mon, May 19, 2014 at 12:35:46PM -0700, Jarno Rajahalme wrote: > When, during a classifier lookup, we narrow down to a single potential > rule, it is enough to match on ("unwildcard") one bit that differs > between the packet and the rule. > > This is a special case of the more general algorithm

[ovs-dev] [PATCH v2 1/3] classifier: added classifier_at_position() for dumps

2014-05-22 Thread Daniele Di Proietto
The new function mimics the semantics of 'hmap''s hmap_at_position(). It can be used to iterate through the classifier's rules when locking can't be used Signed-off-by: Daniele Di Proietto --- lib/classifier.c | 95 lib/classifier.h | 6 +

Re: [ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Daniele Di Proietto
These patches remove struct hmap flow_table from dp_netdev. A new function has been added to the classifier interface (classifier_at_position). Given the complexity added by this call, which has to expose part of the classifier interface, I’m not sure anymore this change is worth merging, but I’

[ovs-dev] [PATCH v2 2/3] tests: sleep to allow revalidators to dump every flow

2014-05-22 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- tests/ofproto-dpif.at | 4 1 file changed, 4 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index b87f735..6e89f04 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -1551,7 +1551,11 @@ NXT_PACKET_IN (xid=0x0):

[ovs-dev] [PATCH v2 3/3] dpif-netdev: removed hmap flow_table

2014-05-22 Thread Daniele Di Proietto
As suggested by others, we can use the classifier, instead of the hash table, as the only flow container in dpif-netdev Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 73 +-- 1 file changed, 38 insertions(+), 35 deletions(-) diff -

Re: [ovs-dev] [PATCH v2 1/2] lib/classifier: Simplify subtable array.

2014-05-22 Thread Ben Pfaff
On Mon, May 19, 2014 at 12:35:45PM -0700, Jarno Rajahalme wrote: > Do not cache the 'tag' and 'max_priority' in the subtable array. This > makes later changes to classifier easier. > > Change CLS_SUBTABLES_FOR_EACH to iterate with a regular array index. > > Also makes the 'cls_subtables*' functi

Re: [ovs-dev] [PATCH] seq: Attribute wakeups to seq_wait()'s caller, not to seq_wait() itself.

2014-05-22 Thread Ben Pfaff
Thanks! Applied to master. On Wed, May 21, 2014 at 01:27:33PM -0700, Jarno Rajahalme wrote: > LGTM, > > Jarno > > Acked-by: Jarno Rajahalme > > > On Apr 30, 2014, at 2:35 PM, Ben Pfaff wrote: > > > > The poll_loop code has a feature that, when turned on manually or > > automatically (due

[ovs-dev] [PATCH v2] bridge: Add test that ports that disappear get added back to the datapath.

2014-05-22 Thread Ben Pfaff
The test added in this commit would have caught the bug fixed by commit 96be8de595150 (bridge: When ports disappear from a datapath, add them back.). With that commit reverted, the new test fails. Signed-off-by: Ben Pfaff Acked-by: Gurucharan Shetty --- v1->v2: Rebase, fixing a lot of conflicts

Re: [ovs-dev] [PATCH] bridge: Add test that ports that disappear get added back to the datapath.

2014-05-22 Thread Ben Pfaff
On Thu, May 22, 2014 at 09:12:09AM -0700, Gurucharan Shetty wrote: > On Fri, Apr 25, 2014 at 10:24 AM, Ben Pfaff wrote: > > The test added in this commit would have caught the bug fixed by commit > > 96be8de595150 (bridge: When ports disappear from a datapath, add them > > back.). With that commi

Re: [ovs-dev] [PATCH] bridge: Add test that ports that disappear get added back to the datapath.

2014-05-22 Thread Gurucharan Shetty
On Fri, Apr 25, 2014 at 10:24 AM, Ben Pfaff wrote: > The test added in this commit would have caught the bug fixed by commit > 96be8de595150 (bridge: When ports disappear from a datapath, add them > back.). With that commit reverted, the new test fails. > > Signed-off-by: Ben Pfaff > -error

[ovs-dev] Say Goodbye to Blood Pressure Worries

2014-05-22 Thread MarineD3
,___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [ovs-discuss] dl_src field didn't function

2014-05-22 Thread Kmindg G
On Thu, May 22, 2014 at 6:00 PM, chen zhang <3zhangchen9...@gmail.com> wrote: > is it true?but when i specify the table like this: > cookie=0x0, duration=68.077s, table=1, n_packets=13, n_bytes=962, in_port=1 > actions=goto_table:3 > cookie=0x0, duration=68.077s, table=1, n_packets=0, n_bytes=0,

Re: [ovs-dev] [ovs-discuss] dl_src field didn't function

2014-05-22 Thread Kmindg G
On Thu, May 22, 2014 at 4:54 PM, chen zhang <3zhangchen9...@gmail.com> wrote: > but i know that when a ofp_match has more specified fields than another,it > would be chosen to function even with the same priority.is it true? Please do not drop the list. No. When a packet matches multiple flows, t