[ovs-dev] [PATCH 2/2] tests/ofproto-dpif.at: Add tests for the ofproto/trace command

2013-05-10 Thread Alex Wang
Two testcases are added to the testsuite, which test the new command syntax and the corresponding corner cases. Signed-off-by: Alex Wang --- tests/ofproto-dpif.at | 303 + 1 file changed, 303 insertions(+) diff --git a/tests/ofproto-dpif.at b/tes

[ovs-dev] [flow_metadata 0/5] improve and use flow_metadata more widely

2013-05-10 Thread Ben Pfaff
The "struct flow_metadata" is only used in a few specific places currently, but it can be generalized and used more broadly. This series does that. The first three patches seem quite reasonable and low-impact to me: flow: Use struct flow_tnl in struct flow_metadata. flow: Extend flow_metadata

[ovs-dev] [flow_metadata 5/5] flow: Make flow_extract()'s caller responsible for metadata.

2013-05-10 Thread Ben Pfaff
We are getting to have a lot of metadata in struct flow. Until now, we have tried to pass all of it as parameters to flow_extract(). Now that the data and metadata members of struct flow are clearly separated, it seems more reasonable to just make the caller initialize them itself. Signed-off-by

[ovs-dev] [flow_metadata 3/5] flow: Add skb_priority and skb_mark to struct flow_metadata.

2013-05-10 Thread Ben Pfaff
With these additions, flow_metadata actually contains all of the metadata fields in a struct flow. Signed-off-by: Ben Pfaff --- lib/flow.c |2 ++ lib/flow.h |2 ++ lib/ofp-util.c | 10 ++ 3 files changed, 14 insertions(+) diff --git a/lib/flow.c b/lib/flow.c index 680b

[ovs-dev] [flow_metadata 2/5] flow: Extend flow_metadata member 'in_port' from 16 to 32 bits.

2013-05-10 Thread Ben Pfaff
This matches the size in struct flow and allows for future extensions to OpenFlow 1.1+ (which uses 32-bit port numbers) and to hold kernel port numbers (which also have a 32-bit range). Signed-off-by: Ben Pfaff --- lib/flow.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[ovs-dev] [flow_metadata 1/5] flow: Use struct flow_tnl in struct flow_metadata.

2013-05-10 Thread Ben Pfaff
We can't currently match on some of the fields in struct flow_tnl via OpenFlow, but it still seems reasonable to use struct flow_tnl in place of duplicating much of it. Signed-off-by: Ben Pfaff --- lib/flow.c|6 ++ lib/flow.h|4 +--- lib/learning-switch.c |

Re: [ovs-dev] [PATCH] Send packet timestamps as export times in IPFIX flow records

2013-05-10 Thread Jesse Gross
On Wed, Apr 24, 2013 at 11:29 AM, Romain Lenglet wrote: > Send an optional OVS_PACKET_ATTR_TIMESTAMP attribute in upcalls with > the packet's timestamp. Add a corresponding tstamp attribute into > struct dpif_upcall. > > Enable Linux packet timestamping, only if at least one flow requires > it si

Re: [ovs-dev] [PATCH] netdev: Incremental BSD fix for netdev refactoriong

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 04:06:41PM -0400, Ed Maste wrote: > On 10 May 2013 14:38, Ben Pfaff wrote: > > On Fri, May 10, 2013 at 02:15:50PM -0400, Ed Maste wrote: > >> This is an incremental to patch v3 of > >> netdev: Factor restoring flags into new "struct netdev_saved_flags", > >> implementing th

Re: [ovs-dev] [netdev v5 1/3] netdev: Add new "struct netdev_rx" for capturing packets from a netdev.

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 01:30:48PM -0700, Ethan Jackson wrote: > You may disagree, but I think 'renaming it "struct netdev"' sounds > better than 'renaming it top "struct netdev"' You mean, grammatically? OK, I changed the commit message. > In netdev_bsd_rx_open(), should we call netdev_dev_bsd_

Re: [ovs-dev] [PATCH 1/2] ofproto: Re-implement the ofproto/trace command

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 01:39:39PM -0700, Alex Wang wrote: > Since the use of single datapath, all bridges belonging to the same type of > datapath will use the same (single) datapath. This causes confusion in the > current 'ofproto/trace' command. Especially, when given the unrelated > 'bridge' an

Re: [ovs-dev] [PATCH 1/2] meta-flow: Simplify mf_from_ofp_port_string()

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 10:54:35PM +0300, Jarno Rajahalme wrote: > ofputil_port_from_string() does all the work already. > > Signed-off-by: Jarno Rajahalme Applied, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinf

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ethan Jackson
> Restoring flags is probably not necessary. It only seems polite to me, > though, to try. Seems like an awful lot of trouble, but we've already got the code so it seems fine to me. Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.org/

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ben Pfaff
I already applied this on the strength of Ed's review. However, you make good points, see below... On Fri, May 10, 2013 at 01:04:26PM -0700, Ethan Jackson wrote: > The indentation is newly incorrect in the calls to > netdev_bsd_do_ioctl(), the prototype for netdev_bsd_update_flags(), > and the pr

[ovs-dev] [PATCH] netdev-linux: Skip NETDEV_UP test in netdev_linux_set_etheraddr() for taps.

2013-05-10 Thread Ben Pfaff
netdev_turn_flags_off() does nothing if the flags that one turns off are already off. Reported-by: Ethan Jackson Signed-off-by: Ben Pfaff --- lib/netdev-linux.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 30cd0f6..9e2

Re: [ovs-dev] [netdev v5 2/3] Rename superclass members to 'up'.

2013-05-10 Thread Ethan Jackson
Acked-by: Ethan Jackson On Fri, May 10, 2013 at 11:50 AM, Ben Pfaff wrote: > --- > lib/netdev-bsd.c | 24 > lib/netdev-dummy.c | 18 +- > lib/netdev-linux.c | 38 +++--- > lib/netdev-vport.c |8 > 4 fi

Re: [ovs-dev] [PATCH] netdev-bsd: Adjust argument line wrapping

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 04:23:03PM -0400, Ed Maste wrote: > This file presumably started out life as a copy of netdev-linux.c, and > some indentation was not updated after s/linux/bsd/. > > Signed-off-by: Ed Maste > --- > There are still a few cases that seem not to match style; I adjusted these

[ovs-dev] [PATCH] netdev-bsd: Adjust argument line wrapping

2013-05-10 Thread Ed Maste
This file presumably started out life as a copy of netdev-linux.c, and some indentation was not updated after s/linux/bsd/. Signed-off-by: Ed Maste --- There are still a few cases that seem not to match style; I adjusted these because Ethan noticed them in commit 4b60911. lib/netdev-bsd.c | 18

[ovs-dev] [PATCH 2/2] tests/ofproto-dpif.at: Add tests for the ofproto/trace command

2013-05-10 Thread Alex Wang
Two testcases are added to the testsuite, which test the new command syntax and the corresponding corner cases. Signed-off-by: Alex Wang --- tests/ofproto-dpif.at | 289 + 1 file changed, 289 insertions(+) diff --git a/tests/ofproto-dpif.at b/tes

Re: [ovs-dev] [PATCH] netdev: Incremental BSD fix for netdev refactoriong

2013-05-10 Thread Ed Maste
On 10 May 2013 14:38, Ben Pfaff wrote: > On Fri, May 10, 2013 at 02:15:50PM -0400, Ed Maste wrote: >> This is an incremental to patch v3 of >> netdev: Factor restoring flags into new "struct netdev_saved_flags", >> implementing the equivalent change for netdev-bsd. >> >> Signed-off-by: Ed Maste >

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ethan Jackson
The indentation is newly incorrect in the calls to netdev_bsd_do_ioctl(), the prototype for netdev_bsd_update_flags(), and the prototype for netdev_vport_update_flags(). In netdev_linux_set_etheraddr(), Do we still need to check if 'netdev_' is NETDEV_UP before turning it off, or can we skip the c

[ovs-dev] [RFC PATCH 2/2] meta-flow: Add MFF_IN_PORT_OXM, a 32-bit in_port.

2013-05-10 Thread Jarno Rajahalme
This helps get rid of one special case in nx_pull_raw() and allows loading of 32-bit values to OXM_OF_IN_PORT in NXAST_LEARN actions. Previously the 16-bit limit acted the same on both NXM_OF_IN_PORT and OXM_OF_IN_PORT, even though OF1.1+ controllers would expect OXM_OF_IN_PORT to be 32 bits wide.

[ovs-dev] [PATCH 1/2] meta-flow: Simplify mf_from_ofp_port_string()

2013-05-10 Thread Jarno Rajahalme
ofputil_port_from_string() does all the work already. Signed-off-by: Jarno Rajahalme --- lib/meta-flow.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index a75e526..e5809d5 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@

[ovs-dev] [netdev v5 0/3] refactor netdev code to make more sense

2013-05-10 Thread Ben Pfaff
Changes v1->v2: - Initial two patches dropped because they have been applied. - Fixed merge conflicts against current master. Changes v2->v3: - Fixed merge conflicts against current master. Changes v3->v4: - Fix use-after-free in patch 1 reported by Ed Maste. Changes v4->v5: - First pa

[ovs-dev] [netdev v5 2/3] Rename superclass members to 'up'.

2013-05-10 Thread Ben Pfaff
--- lib/netdev-bsd.c | 24 lib/netdev-dummy.c | 18 +- lib/netdev-linux.c | 38 +++--- lib/netdev-vport.c |8 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/netdev-bsd.c b/lib/netdev

[ovs-dev] [netdev v5 1/3] netdev: Add new "struct netdev_rx" for capturing packets from a netdev.

2013-05-10 Thread Ben Pfaff
Separating packet capture from "struct netdev" means that there is no remaining per-"struct netdev" state, which will allow us to get rid of "struct netdev_dev" (by renaming it to "struct netdev"). Signed-off-by: Ben Pfaff --- lib/dpif-netdev.c | 13 ++- lib/netdev-bsd.c | 309 ++

Re: [ovs-dev] [PATCH] netdev: Incremental BSD fix for netdev refactoriong

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 02:15:50PM -0400, Ed Maste wrote: > This is an incremental to patch v3 of > netdev: Factor restoring flags into new "struct netdev_saved_flags", > implementing the equivalent change for netdev-bsd. > > Signed-off-by: Ed Maste > --- > With this, the first patch now passes u

[ovs-dev] [PATCH] netdev: Incremental BSD fix for netdev refactoriong

2013-05-10 Thread Ed Maste
This is an incremental to patch v3 of netdev: Factor restoring flags into new "struct netdev_saved_flags", implementing the equivalent change for netdev-bsd. Signed-off-by: Ed Maste --- With this, the first patch now passes unit tests for me on FreeBSD. lib/netdev-bsd.c | 43 +++

Re: [ovs-dev] [PATCH v3] OpenFlow-level flow-based tunneling support.

2013-05-10 Thread Ben Pfaff
On Thu, May 09, 2013 at 03:24:16PM +0300, Jarno Rajahalme wrote: > Adds tun_src and tun_dst match and set capabilities via new NXM fields > NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST. This allows management of > large number of tunnels via the flow tables, without requiring the tunnels > to be pr

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 01:21:11PM -0400, Ed Maste wrote: > On 10 May 2013 13:12, Ed Maste wrote: > > Ahh, of course. This fixes the segfaulting tests for me, but the unit > > tests now get stuck in "tunnel - input." > > Oh, and of course the reason ovs-vsctl is stuck is that ovs-vswitchd > seg

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ed Maste
On 10 May 2013 13:12, Ed Maste wrote: > Ahh, of course. This fixes the segfaulting tests for me, but the unit > tests now get stuck in "tunnel - input." Oh, and of course the reason ovs-vsctl is stuck is that ovs-vswitchd segfaulted. #0 0x00080164b560 in strncpy () from /lib/libc.so.7 #1

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ed Maste
On 10 May 2013 11:55, Ben Pfaff wrote: > Thanks, I found the problem with valgrind, and here is an incremental > fix: > > diff --git a/lib/netdev.c b/lib/netdev.c > index 9590f83..415cdb4 100644 > --- a/lib/netdev.c > +++ b/lib/netdev.c > @@ -322,8 +322,10 @@ void > netdev_close(struct netdev *ne

[ovs-dev] [netdev v4 2/4] netdev: Add new "struct netdev_rx" for capturing packets from a netdev.

2013-05-10 Thread Ben Pfaff
Separating packet capture from "struct netdev" means that there is no remaining per-"struct netdev" state, which will allow us to get rid of "struct netdev_dev" (by renaming it to "struct netdev"). Signed-off-by: Ben Pfaff --- lib/dpif-netdev.c | 13 ++- lib/netdev-bsd.c | 309 ++

[ovs-dev] [netdev v4 3/4] Rename superclass members to 'up'.

2013-05-10 Thread Ben Pfaff
--- lib/netdev-bsd.c | 24 lib/netdev-dummy.c | 18 +- lib/netdev-linux.c | 38 +++--- lib/netdev-vport.c |8 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/netdev-bsd.c b/lib/netdev

[ovs-dev] [netdev v4 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ben Pfaff
This gets rid of the only per-instance data in "struct netdev", which will make it possible to merge "struct netdev_dev" into "struct netdev" in a later commit. Signed-off-by: Ben Pfaff --- lib/dpif-netdev.c |6 +- lib/netdev-dummy.c|5 +- lib/netdev-linux.c| 22 +++--- lib

[ovs-dev] [netdev v4 0/4] refactor netdev code to make more sense

2013-05-10 Thread Ben Pfaff
Changes v1->v2: - Initial two patches dropped because they have been applied. - Fixed merge conflicts against current master. Changes v2->v3: - Fixed merge conflicts against current master. Changes v3->v4: - Fix use-after-free in patch 1 reported by Ed Maste. Ben Pfaff (4): netdev: Fac

Re: [ovs-dev] [PATCH v2] Use updated dl_type when checking actions that use fields

2013-05-10 Thread Jesse Gross
On Thu, May 9, 2013 at 7:00 PM, Simon Horman wrote: > Update handling of the following actions to use the dl_type set by MPLS > push and pop actions if it differs from the original dl_type. This is > consistent with the existing checking of load actions and allows > their existing checks to enforc

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ben Pfaff
On Fri, May 10, 2013 at 10:51:34AM -0400, Ed Maste wrote: > On 9 May 2013 18:35, Ben Pfaff wrote: > > This gets rid of the only per-instance data in "struct netdev", which > > will make it possible to merge "struct netdev_dev" into "struct netdev" in > > a later commit. > > The four patches gener

Re: [ovs-dev] [netdev v3 1/4] netdev: Factor restoring flags into new "struct netdev_saved_flags".

2013-05-10 Thread Ed Maste
On 9 May 2013 18:35, Ben Pfaff wrote: > This gets rid of the only per-instance data in "struct netdev", which > will make it possible to merge "struct netdev_dev" into "struct netdev" in > a later commit. The four patches generally look good to me, and when I apply the whole set they pass the uni