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

2013-06-11 Thread Simon Horman
On Tue, Jun 11, 2013 at 02:26:32PM -0700, Jesse Gross wrote: > On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman wrote: > > diff --git a/datapath/actions.c b/datapath/actions.c > > index 0dac658..197811a 100644 > > --- a/datapath/actions.c > > +++ b/datapath/actions.c > > +static int push_mpls(struct

Re: [ovs-dev] [PATCH 1/2] ofproto-dpif: Use proper flow when using facets.

2013-06-11 Thread Justin Pettit
Thanks for the quick review. I pushed this to master and branch-1.11. --Justin On Jun 11, 2013, at 11:03 PM, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > On Tue, Jun 11, 2013 at 11:00 PM, Justin Pettit wrote: >> The handle_flow_miss_with_facet() function used the facet's flow >> info

Re: [ovs-dev] [PATCH 1/2] ofproto-dpif: Use proper flow when using facets.

2013-06-11 Thread Ethan Jackson
Acked-by: Ethan Jackson On Tue, Jun 11, 2013 at 11:00 PM, Justin Pettit wrote: > The handle_flow_miss_with_facet() function used the facet's flow > information instead of the missed flow. This corrects that. > > Signed-off-by: Justin Pettit > --- > ofproto/ofproto-dpif.c |4 ++-- > 1 file

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Print slow path actions in dpif/dump-megaflows.

2013-06-11 Thread Ethan Jackson
We really need to get rid of this compose_slow_path business, but for now this seems fine to me. Thanks Acked-by: Ethan Jackson On Tue, Jun 11, 2013 at 11:00 PM, Justin Pettit wrote: > It's often helpful to see what the slow path actions actual are. Print > them when "ovs-appctl dpif/dump-meg

[ovs-dev] [PATCH 2/2] ofproto-dpif: Print slow path actions in dpif/dump-megaflows.

2013-06-11 Thread Justin Pettit
It's often helpful to see what the slow path actions actual are. Print them when "ovs-appctl dpif/dump-megaflows" is called. Signed-off-by: Justin Pettit --- ofproto/ofproto-dpif.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/o

[ovs-dev] [PATCH 1/2] ofproto-dpif: Use proper flow when using facets.

2013-06-11 Thread Justin Pettit
The handle_flow_miss_with_facet() function used the facet's flow information instead of the missed flow. This corrects that. Signed-off-by: Justin Pettit --- ofproto/ofproto-dpif.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofpro

[ovs-dev] [PATCHv3 4/5] ofp-util: Add SCTP support

2013-06-11 Thread Joe Stringer
Reviewed-by: Simon Horman Signed-off-by: Joe Stringer --- v3: Rebase v2: Add flowmod parse tests Add set-field tests Add NEWS item Add sctp to ovs-ofctl.8 --- NEWS |1 + OPENFLOW-1.1+|4 --- lib/match.c |4 +++ lib/meta-flow.c

[ovs-dev] [PATCHv3 2/5] ofproto-dpif: Add SCTP support

2013-06-11 Thread Joe Stringer
Reviewed-by: Simon Horman Signed-off-by: Joe Stringer --- v3: Rebase v2: Fix broken test Use the correct packet pointer Calculate checksums as delta from incoming checksum --- include/linux/openvswitch.h |6 + include/sparse/netinet/in.h |1 + lib/flow.c |

[ovs-dev] [PATCHv3 1/5] lib: Add CRC32C Implementation

2013-06-11 Thread Joe Stringer
This implementation was derived from FreeBSD: http://code.google.com/p/freebsd-head/source/browse/sys/libkern/crc32.c Reviewed-by: Simon Horman Signed-off-by: Joe Stringer --- v3: Rebase Return crc32c checksum in network byte-order Add checksum tests based on Intel IPPs documentation v2:

[ovs-dev] [PATCHv3 5/5] debian: Add CRC32C implementation license

2013-06-11 Thread Joe Stringer
Signed-off-by: Joe Stringer --- debian/copyright.in |4 1 file changed, 4 insertions(+) diff --git a/debian/copyright.in b/debian/copyright.in index a1a2c3c..3bcf332 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -101,6 +101,10 @@ License: The full text of each license

[ovs-dev] [PATCHv3 0/5] SCTP Support

2013-06-11 Thread Joe Stringer
This patchset introduces matching and rewriting support for sctp src,dst ports. Round three adds further crc32c tests on the userspace side and adds support for skb fragments on the kernel side. Various sparse errors and previous feedback have also been addressed. This series is also available at:

[ovs-dev] [PATCHv3 3/5] datapath: Add SCTP support

2013-06-11 Thread Joe Stringer
This patch adds support for rewriting SCTP src,dst ports similar to the functionality already available for TCP/UDP. Rewriting SCTP ports is expensive due to double-recalculation of the SCTP checksums; this is performed to ensure that packets traversing OVS with invalid checksums will continue to

Re: [ovs-dev] [megaflow v3 1/2] datapath: Mega flow implementation

2013-06-11 Thread Andy Zhou
Did not realize that the __CHECK_ENDIAN__ flags has to be passed by hand to enable those checks. This is what I use to verify the fix. Any better way to enable this check? make C=2 CF="-D__CHECK_ENDIAN__" The following incremental patch fixes those warnings. Andy diff --git a/datapath/flow.c

[ovs-dev] [PATCH v4] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Pravin B Shelar
As suggested by Jesse in the comment for patch "gre: Restructure tunneling", following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar --- v3-v4: - use correct len for csum. v2-v3: - moved skb_postpull_rcsum() to private ovs header. - used ETH_ALEN to replace rcsum. v1-v2

Re: [ovs-dev] [PATCH] ofproto-dpif: Never wildcard dl_type for "normal" action.

2013-06-11 Thread Justin Pettit
Thanks. I pushed this to master. --Justin On Jun 11, 2013, at 5:30 PM, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > On Tue, Jun 11, 2013 at 5:21 PM, Justin Pettit wrote: >> The is_gratuitous_arp() function is occasionally called when >> processing the "normal" action. The previous c

Re: [ovs-dev] [PATCH] ofproto-dpif: Never wildcard dl_type for "normal" action.

2013-06-11 Thread Ethan Jackson
Acked-by: Ethan Jackson On Tue, Jun 11, 2013 at 5:21 PM, Justin Pettit wrote: > The is_gratuitous_arp() function is occasionally called when > processing the "normal" action. The previous code only disabled > wildcarding the dl_type field when the function was called, but > since it runs occasi

Re: [ovs-dev] [megaflow v3 1/2] datapath: Mega flow implementation

2013-06-11 Thread Jesse Gross
On Tue, Jun 11, 2013 at 4:45 PM, Andy Zhou wrote: > Add mega flow support in kernel datapath. > > Pravin has made significant contributions to this patch. Including > the mega flow id look up scheme, API clean ups, and bug fixes. > > Co-authored-by: Pravin B Shelar > Signed-off-by: Pravin B Shela

[ovs-dev] [PATCH] ofproto-dpif: Never wildcard dl_type for "normal" action.

2013-06-11 Thread Justin Pettit
The is_gratuitous_arp() function is occasionally called when processing the "normal" action. The previous code only disabled wildcarding the dl_type field when the function was called, but since it runs occasionally, it could lead to inconsistencies in the facet table. This commit causes the dl_t

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Ben Pfaff
Thanks! On Tue, Jun 11, 2013 at 05:03:46PM -0700, Alex Wang wrote: > Thanks Ben, > > The factors are all reasonable. Especially, the negation can be confusing. > > Also, with you confirmation, I'll choose the "oft_to_u16()", "odp_to_u32()" > way. ;D > > I'll adjust the code accordingly and rese

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Alex Wang
Thanks Ben, The factors are all reasonable. Especially, the negation can be confusing. Also, with you confirmation, I'll choose the "oft_to_u16()", "odp_to_u32()" way. ;D I'll adjust the code accordingly and resend a new version. Kind Regards, Alex Wang, On Tue, Jun 11, 2013 at 4:55 PM, Ben P

Re: [ovs-dev] [PATCH 0/5] Backport facet wildcarding to 1.11.

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 03:17:17PM -0700, Justin Pettit wrote: > This is a backport of the facet wildcarding code to 1.11. The patch that > should be the most closely looked at is "ofproto-dpif: Consolidate facet > stat logic.", since I had to modify the facet_flush_stats() and > rule_get_stats()

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Ben Pfaff
On Mon, Jun 10, 2013 at 08:50:40AM -0700, Alex Wang wrote: > Subject: [PATCH] This patch implements "ofp_is_less_than()" and use it > to replace the PORT_COMPARE() function for port comparison. > Date: Mon, 10 Jun 2013 09:05:50 -0700 > Message-Id: <1370880350-22000-1-git-send-email-al...@nicira.com

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 04:10:34PM -0700, Alex Wang wrote: > On Tue, Jun 11, 2013 at 3:59 PM, Ben Pfaff wrote: > > > On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > > > Currently datapath ports and openflow ports are both represented by > > unsigned > > > integers of various sizes. W

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 12, 2013, at 2:10 , ext Alex Wang wrote: > Thanks Ben, > > This makes sense. But one thing is that if we compare to "ofp_port_t" > variables, e.g. "flow->in_port.ofp_port >= OFPP_MAX", we must call this > function for both operands. this seems to make coding harder, really want to > kn

Re: [ovs-dev] [PATCH v3] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Jesse Gross
On Tue, Jun 11, 2013 at 3:54 PM, Pravin B Shelar wrote: > diff --git a/datapath/actions.c b/datapath/actions.c > index 0dac658..f9da8a4 100644 > --- a/datapath/actions.c > +++ b/datapath/actions.c > @@ -132,9 +132,17 @@ static int set_eth_addr(struct sk_buff *skb, > if (unlikely(err)) >

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Alex Wang
On Tue, Jun 11, 2013 at 3:59 PM, Ben Pfaff wrote: > On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > > Currently datapath ports and openflow ports are both represented by > unsigned > > integers of various sizes. With implicit casts, etc. it is easy to mix > them > > up and use one wh

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Ben Pfaff
On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > Currently datapath ports and openflow ports are both represented by unsigned > integers of various sizes. With implicit casts, etc. it is easy to mix them > up and use one where the other is expected. This commit creates two typedefs > of

Re: [ovs-dev] [PATCH v2] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Pravin Shelar
On Tue, Jun 11, 2013 at 3:30 PM, Jesse Gross wrote: > On Tue, Jun 11, 2013 at 1:20 PM, Pravin B Shelar wrote: >> diff --git a/datapath/actions.c b/datapath/actions.c >> index 0dac658..6d60cd0 100644 >> --- a/datapath/actions.c >> +++ b/datapath/actions.c >> @@ -132,9 +132,17 @@ static int set_eth

[ovs-dev] [PATCH v3] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Pravin B Shelar
As suggested by Jesse in the comment for patch "gre: Restructure tunneling", following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar --- v2-v3: - moved skb_postpull_rcsum() to private ovs header. - used ETH_ALEN to replace rcsum. v1-v2: - Fixed lisp and vlan_deaccel_tag

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Store relevant fields for wildcarding in facet.

2013-06-11 Thread Justin Pettit
On Jun 11, 2013, at 12:52 PM, Ben Pfaff wrote: > On Tue, Jun 11, 2013 at 12:01:24PM -0700, Justin Pettit wrote: > >> An incremental follows. > > This seems reasonable. Thanks for the reviews! I pushed this to master and sent out a backported version for branch-1.11. --Justin _

Re: [ovs-dev] [PATCH v2] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Jesse Gross
On Tue, Jun 11, 2013 at 1:20 PM, Pravin B Shelar wrote: > diff --git a/datapath/actions.c b/datapath/actions.c > index 0dac658..6d60cd0 100644 > --- a/datapath/actions.c > +++ b/datapath/actions.c > @@ -132,9 +132,17 @@ static int set_eth_addr(struct sk_buff *skb, > if (unlikely(err)) >

[ovs-dev] [PATCH 1/5] ofproto-dpif: Consolidate facet stat logic.

2013-06-11 Thread Justin Pettit
From: Ethan Jackson The logic for updating statistics at the facet level had been spread through ofproto-dpif in a rather confusing manner. This patch consolidates as much of this logic as is reasonable into facet_push_stats(). On a side note, I'd expect this patch to have a marginal positive p

[ovs-dev] [PATCH 2/5] flow: Add new flow_wildcards_fold_minimask() function.

2013-06-11 Thread Justin Pettit
From: Ethan Jackson This function will be useful in a future commit. Signed-off-by: Ethan Jackson Co-authored-by: Justin Pettit Signed-off-by: Justin Pettit --- lib/flow.c | 43 +-- lib/flow.h |3 +++ 2 files changed, 32 insertions(+), 14 deletio

[ovs-dev] [PATCH 0/5] Backport facet wildcarding to 1.11.

2013-06-11 Thread Justin Pettit
This is a backport of the facet wildcarding code to 1.11. The patch that should be the most closely looked at is "ofproto-dpif: Consolidate facet stat logic.", since I had to modify the facet_flush_stats() and rule_get_stats() to prevent double-counting. The others were very straight-forward. Et

[ovs-dev] [PATCH 4/5] flow: Add new wildcard functions.

2013-06-11 Thread Justin Pettit
From: Ethan Jackson Rename the function flow_wildcards_combine() to flow_wildcards_and(). Add new flow_wildcards_or() and flow_hash_in_wildcards() functions. These will be useful in a future patch. Signed-off-by: Ethan Jackson Signed-off-by: Justin Pettit --- lib/flow.c | 48 ++

[ovs-dev] [PATCH 3/5] classifier: Add 'wc' argument to classifier_lookup().

2013-06-11 Thread Justin Pettit
From: Ethan Jackson A future commit will want to know what bits were significant during the classifier lookup. Signed-off-by: Ethan Jackson Co-authored-by: Justin Pettit Signed-off-by: Justin Pettit --- lib/classifier.c| 17 +++-- lib/classifier.h|3 ++- ofp

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

2013-06-11 Thread Jesse Gross
On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman wrote: > diff --git a/datapath/actions.c b/datapath/actions.c > index 0dac658..197811a 100644 > --- a/datapath/actions.c > +++ b/datapath/actions.c > +static int push_mpls(struct sk_buff *skb, > +const struct ovs_action_push_mpls *m

Re: [ovs-dev] [PATCH] ofproto-dpif: Fix format specifier.

2013-06-11 Thread Ben Pfaff
Thanks, applied. On Tue, Jun 11, 2013 at 01:40:52PM -0700, Justin Pettit wrote: > Acked-by: Justin Pettit > > > On Jun 11, 2013, at 1:38 PM, Ben Pfaff wrote: > > > list_size() returns a size_t, not a uint64_t. > > > > Found by GCC. > > > > Signed-off-by: Ben Pfaff > > --- > > ofproto/ofpro

Re: [ovs-dev] [PATCH] ofproto-dpif: Fix format specifier.

2013-06-11 Thread Justin Pettit
Acked-by: Justin Pettit On Jun 11, 2013, at 1:38 PM, Ben Pfaff wrote: > list_size() returns a size_t, not a uint64_t. > > Found by GCC. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/ofproto/ofproto

[ovs-dev] [PATCH] ofproto-dpif: Fix format specifier.

2013-06-11 Thread Ben Pfaff
list_size() returns a size_t, not a uint64_t. Found by GCC. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 8df2679..8bc3352 100644 --- a/ofproto/ofproto-dpif.c +

Re: [ovs-dev] [PATCH 3/3] rtnetlink-link: Make 'attrs' local variable non-static.

2013-06-11 Thread Ben Pfaff
On Mon, Jun 10, 2013 at 02:13:26PM -0700, Gurucharan Shetty wrote: > On Mon, Apr 29, 2013 at 3:23 PM, Ben Pfaff wrote: > > > I don't see any reason for this variable to be static. > > > Looks good to me, thanks. Thanks, applied to master. ___ dev maili

Re: [ovs-dev] [PATCH] ofproto-dpif: Retire 'struct initial_vals'.

2013-06-11 Thread Ben Pfaff
On Wed, Jun 05, 2013 at 05:27:32PM -0700, Ethan Jackson wrote: > By detecting that a port is a vlan splinter realdev, we can force > xlate_actions() to emit the appropriate vlan push action. This > allows as to ditch struct initial_vals. It will not be missed. > > Signed-off-by: Ethan Jackson >

[ovs-dev] [PATCH] Add VLAN splinters unit test.

2013-06-11 Thread Ben Pfaff
CC: Ethan Jackson Signed-off-by: Ben Pfaff --- lib/dummy.c |3 +- lib/dummy.h |3 +- lib/vlandev.c | 346 +++ lib/vlandev.h |8 +- tests/automake.mk |1 + tests/ofproto-macros.at |9

[ovs-dev] [PATCH v2] datapath: make skb->csum consistent with rest of networking stack.

2013-06-11 Thread Pravin B Shelar
As suggested by Jesse in the comment for patch "gre: Restructure tunneling", following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar --- v1-v2: - Fixed lisp and vlan_deaccel_tag() --- datapath/actions.c |8 datapath/flow.c

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Store relevant fields for wildcarding in facet.

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 12:01:24PM -0700, Justin Pettit wrote: > On Jun 11, 2013, at 9:41 AM, Ben Pfaff wrote: > > > On Tue, Jun 11, 2013 at 01:20:32AM -0700, Justin Pettit wrote: > >> Dynamically determines the flow fields that were relevant in > >> processing flows based on the OpenFlow flow ta

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Store relevant fields for wildcarding in facet.

2013-06-11 Thread Justin Pettit
On Jun 11, 2013, at 9:41 AM, Ben Pfaff wrote: > On Tue, Jun 11, 2013 at 01:20:32AM -0700, Justin Pettit wrote: >> Dynamically determines the flow fields that were relevant in >> processing flows based on the OpenFlow flow table and switch >> configuration. The immediate use for this functionali

Re: [ovs-dev] [megaflow v2 3/3] ovs-dpctl: Add mega flow support

2013-06-11 Thread Ben Pfaff
On Fri, Jun 07, 2013 at 01:35:22PM -0700, Andy Zhou wrote: > Added --mega option to ovs-dpctl command to allow mega flow to be > specified and displayed. ovs-dpctl tool is mainly used as debugging > tool. > > This patch also implements the low level user space routines to send > and receive mega

Re: [ovs-dev] [PATCH] odp-execute: Style fixes

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 11:05:55AM +0900, Joe Stringer wrote: > Signed-off-by: Joe Stringer Applied, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Store relevant fields for wildcarding in facet.

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 01:20:32AM -0700, Justin Pettit wrote: > Dynamically determines the flow fields that were relevant in > processing flows based on the OpenFlow flow table and switch > configuration. The immediate use for this functionality is to > cache action translations for similar flows

Re: [ovs-dev] [PATCH 1/2] flow: Add new wildcard functions.

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 01:20:31AM -0700, Justin Pettit wrote: > From: Ethan Jackson > > Rename the function flow_wildcards_combine() to flow_wildcards_and(). > Add new flow_wildcards_or() and flow_hash_in_wildcards() functions. > These will be useful in a future patch. > > Signed-off-by: Ethan

[ovs-dev] [PATCH 0/2] Store wildcards in facets

2013-06-11 Thread Justin Pettit
This patch series is a replacement for the final patch in my "xc" series. Instead of keeping an external cache of xout translations, we store wildcards directly in facets and create exact-match flows in subfacets. This is a less intrusive change and less brittle than the xout cache method. Thank

[ovs-dev] [PATCH 1/2] flow: Add new wildcard functions.

2013-06-11 Thread Justin Pettit
From: Ethan Jackson Rename the function flow_wildcards_combine() to flow_wildcards_and(). Add new flow_wildcards_or() and flow_hash_in_wildcards() functions. These will be useful in a future patch. Signed-off-by: Ethan Jackson Signed-off-by: Justin Pettit --- lib/flow.c | 48 ++

Re: [ovs-dev] [xc_v2 4/4] ofproto-dpif: Track relevant fields for wildcarding and add xout cache.

2013-06-11 Thread Justin Pettit
On Jun 7, 2013, at 1:04 PM, Ben Pfaff wrote: > I think that nxm_execute_reg_move() and nxm_execute_stack_push() could > just mask out the subfield that is read, not the whole field that > contains the subfield. Fair enough. Should be addressed in next patch. > The 'wc' member of xlate_out is

Re: [ovs-dev] [xc_v2 4/4] ofproto-dpif: Track relevant fields for wildcarding and add xout cache.

2013-06-11 Thread Justin Pettit
On Jun 7, 2013, at 2:51 AM, "Rajahalme, Jarno (NSN - FI/Espoo)" wrote: >> @@ -3764,7 +3880,7 @@ handle_flow_miss_with_facet(struct flow_miss *miss, >> struct facet *facet, >>struct ofpbuf *packet; >> >>subfacet = subfacet_create(facet, miss, now); >> -want_path = subfacet->facet->x