Re: [ovs-dev] [PATCH 0/2 v4] Open vSwitch zerocopy upcall

2013-11-13 Thread David Miller
From: Thomas Graf Date: Fri, 8 Nov 2013 11:47:16 +0100 > Respin of the zerocopy patches for the openvswitch upcall. > > V4: - Daniel Borkmann pointed out that the style in skbuff.h has changed > in net-next, adapted to no longer using extern in headers. > V3: - Removed unneeded alignment

Re: [ovs-dev] [PATCH v2] OPENFLOW-1.1+: Update MPLS items

2013-11-13 Thread Simon Horman
On Wed, Nov 13, 2013 at 06:21:51PM -0800, Ben Pfaff wrote: > On Thu, Nov 14, 2013 at 11:19:07AM +0900, Simon Horman wrote: > > * MPLS BoS match is supported as much as other MPLS matches. > > That is, all that is missing is the kernel datapath side > > which is part my pending patchset. > > >

Re: [ovs-dev] [PATCH] ofp-actions: Account for OF version when enforcing action consistency

2013-11-13 Thread Simon Horman
On Wed, Nov 13, 2013 at 10:45:13AM -0800, Ben Pfaff wrote: > On Tue, Nov 05, 2013 at 05:34:34PM +0900, Simon Horman wrote: > > Some different versions of OpenFlow require different consistency > > checking. This patch allows for three different variants to be checked. > > > > 1. OpenFlow1.0 > > >

Re: [ovs-dev] [PATCH] OPENFLOW-1.1+: Remove note about action translation.

2013-11-13 Thread Simon Horman
On Wed, Nov 13, 2013 at 03:39:05PM -0800, Ben Pfaff wrote: > On Wed, Nov 13, 2013 at 02:12:58PM -0800, Jarno Rajahalme wrote: > > Action translation to/from OpenFlow 1.2 set-field actions is done. > > > > Signed-off-by: Jarno Rajahalme > > Acked-by: Ben Pfaff Reviewed-by: Simon Horman __

Re: [ovs-dev] [PATCH V3 2/2] bfd: Add new key "flap_count" to "bfd_status".

2013-11-13 Thread Ethan Jackson
At a high level, I don't think this patch is tracking the right thing. We don't actually care how many times the bfd state changes. What we actually care about is how many times the result of bfd_forwarding() changes. That's because bfd_forwarding() is the function which actually changes how tra

Re: [ovs-dev] [PATCH v2] OPENFLOW-1.1+: Update MPLS items

2013-11-13 Thread Ben Pfaff
On Thu, Nov 14, 2013 at 11:19:07AM +0900, Simon Horman wrote: > * MPLS BoS match is supported as much as other MPLS matches. > That is, all that is missing is the kernel datapath side > which is part my pending patchset. > > * The rework of tag order does require work but it is > covered by

[ovs-dev] [PATCH v2] OPENFLOW-1.1+: Update MPLS items

2013-11-13 Thread Simon Horman
* MPLS BoS match is supported as much as other MPLS matches. That is, all that is missing is the kernel datapath side which is part my pending patchset. * The rework of tag order does require work but it is covered by my pending patchset. Signed-off-by: Simon Horman --- OPENFLOW-1.1+ | 7

[ovs-dev] [PATCH V3 2/2] bfd: Add new key "flap_count" to "bfd_status".

2013-11-13 Thread Alex Wang
This commit adds a new key "flap_count" to "bfd_status". It is to count the number of bfd state flapping since start. Signed-off-by: Alex Wang --- v2 -> v3: - rebase to master v1 -> v2: - rebase to master --- lib/bfd.c| 14 ++ tests/bfd.at | 50 +++

Re: [ovs-dev] OpenFlow1.2+ Action Translation

2013-11-13 Thread Simon Horman
On Wed, Nov 13, 2013 at 01:57:35PM -0800, Jarno Rajahalme wrote: > > On Nov 12, 2013, at 10:06 PM, Ben Pfaff wrote: > > > On Wed, Nov 13, 2013 at 03:06:04PM +0900, Simon Horman wrote: > >> I have a question regarding the following entry in OPENFLOW-1.1+: > >> > >>* Action translation needs

Re: [ovs-dev] [PATCH] OPENFLOW-1.1+: Remove note about action translation.

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 02:12:58PM -0800, Jarno Rajahalme wrote: > Action translation to/from OpenFlow 1.2 set-field actions is done. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.or

[ovs-dev] [PATCH] OPENFLOW-1.1+: Remove note about action translation.

2013-11-13 Thread Jarno Rajahalme
Action translation to/from OpenFlow 1.2 set-field actions is done. Signed-off-by: Jarno Rajahalme --- OPENFLOW-1.1+ |5 - 1 file changed, 5 deletions(-) diff --git a/OPENFLOW-1.1+ b/OPENFLOW-1.1+ index d7c2b5f..48ba441 100644 --- a/OPENFLOW-1.1+ +++ b/OPENFLOW-1.1+ @@ -86,11 +86,6 @@ ad

Re: [ovs-dev] OpenFlow1.2+ Action Translation

2013-11-13 Thread Jarno Rajahalme
On Nov 12, 2013, at 10:06 PM, Ben Pfaff wrote: > On Wed, Nov 13, 2013 at 03:06:04PM +0900, Simon Horman wrote: >> I have a question regarding the following entry in OPENFLOW-1.1+: >> >>* Action translation needs some work to transform OpenFlow 1.1 >> field modification actions into Ope

Re: [ovs-dev] [PATCH] datapath: Change ovs_flow_tbl_lookup_xx() APIs for

2013-11-13 Thread Andy Zhou
Please ignore this patch. I have sent a v2 with more content in the commit message. On Wed, Nov 13, 2013 at 12:11 PM, Andy Zhou wrote: > API changes only. No functional chnages. > > Reported by: Ben Pfaff > > Signed-off-by: Andy Zhou > --- > datapath/datapath.c | 16 > d

[ovs-dev] [PATCH V2] datapath: Change ovs_flow_tbl_lookup_xx() APIs

2013-11-13 Thread Andy Zhou
API changes only for code readability. No functional chnages. This patch removes the underscored version. Added a new API ovs_flow_tbl_lookup_stats() that returns the n_mask_hits. Reported by: Ben Pfaff Signed-off-by: Andy Zhou --- v1->v2: Add more content to the commit message.

[ovs-dev] [PATCH v2 8/9] schema: Add "fieldspec" to table "Flow_Table".

2013-11-13 Thread Jarno Rajahalme
"fieldspec" is a string map with the following keys: "prefix" A list of field names for which prefix lookup should be used. The fields for which prefix lookup can be enabled are: - tun_id, tun_src, tun_dst - metadata - reg0 -- reg7 - ip_src, ip_dst (or aliases nw_src and nw_dst) - ipv6_src, ipv6

[ovs-dev] [PATCH v2 9/9] Classifier: On-demand prefix tree lookup.

2013-11-13 Thread Jarno Rajahalme
There is a bit more bookkeeping, and preliminary measurements did not show significant benefit. Results may differ with larger flow tables with more address space, though. Signed-off-by: Jarno Rajahalme --- lib/classifier.c | 158 +- 1 file c

[ovs-dev] [PATCH v2 3/9] miniflow: Use 64-bit map.

2013-11-13 Thread Jarno Rajahalme
Simplifies code a bit and makes it more understandable. We are currently at 44 or so uint32s, so there is room for extending struct flow before we run out of bits in the map. Signed-off-by: Jarno Rajahalme --- lib/flow.c | 233 ++- lib/f

[ovs-dev] [PATCH v2 0/9] Classifier: Better wildcarding

2013-11-13 Thread Jarno Rajahalme
This series implements two techniques for better wildcarding: 1. Staged sub-table matching: Each sub-table is matched in segments, starting from metadata and lower protocol layer fields, progressing towards higher layers only as needed. That is, if we can determine that there is no match

[ovs-dev] [PATCH v2 1/9] lib/util: Make raw_ctz() implementation non-static.

2013-11-13 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/util.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index a32c80a..75d443d 100644 --- a/lib/util.c +++ b/lib/util.c @@ -892,7 +892,7 @@ log_2_ceil(uint32_t n) #elif __GNUC__ >= 4 && UINT_MAX == UINT32_MAX /

[ovs-dev] [PATCH v2 7/9] Classifier: Track IP addresses for more wildcarding.

2013-11-13 Thread Jarno Rajahalme
Add a prefix tree (trie) structure for tracking the used IP address space, enabling skipping classifier tables containing longer masks than necessary for the given address. This enables more wildcarding for datapath flows in ,e.g., parts of the address space without host routes. In fact, the trie

[ovs-dev] [PATCH v2 2/9] lib/util: Add ctz64() and popcount64().

2013-11-13 Thread Jarno Rajahalme
Add raw_ctz64(), ctz64(), and popcount64() using builtins when available. I'm not sure if the "UINT64_MAX == ~0UL" and "UINT64_MAX == ~0ULL" work in all cases as I imagine they would. Signed-off-by: Jarno Rajahalme --- lib/util.h| 51 +--- tests/tes

[ovs-dev] [PATCH v2 5/9] Classifier: Staged sub-table matching.

2013-11-13 Thread Jarno Rajahalme
Each sub-table of a classifier is matched in segments, starting from metadata and lower protocol layer fields, progressing towards higher layers only as needed. That is, if we can determine that there is no match on a specific segment, the higher layer fields need not be looked at, and hence will

[ovs-dev] [PATCH v2 4/9] Classifier: Add minimatch_matches_flow_likely()

2013-11-13 Thread Jarno Rajahalme
Make comparison done after matching hash values faster by optimizing for the expected success. Signed-off-by: Jarno Rajahalme --- lib/classifier.c |2 +- lib/match.c | 22 ++ lib/match.h |2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a

[ovs-dev] [PATCH v2 6/9] lib/util: Add clz() and clz64().

2013-11-13 Thread Jarno Rajahalme
Count leading zeroes using builtins if available. Signed-off-by: Jarno Rajahalme --- lib/util.c| 25 - lib/util.h| 35 +++ tests/library.at |1 + tests/test-util.c | 53

Re: [ovs-dev] [PATCH v2] FAQ, NEWS: Notes on TCP flags matching.

2013-11-13 Thread Ben Pfaff
Somehow it got pushed without the Signed-off-by. There's supposed to be a hook to prevent that, I wonder what happened. On Wed, Nov 13, 2013 at 12:43:47PM -0800, Jarno Rajahalme wrote: > Thanks, applied to master. > > On Nov 12, 2013, at 8:37 AM, Ben Pfaff wrote: > > > On Tue, Nov 12, 2013 at

Re: [ovs-dev] [PATCH v2] FAQ, NEWS: Notes on TCP flags matching.

2013-11-13 Thread Jarno Rajahalme
Thanks, applied to master. On Nov 12, 2013, at 8:37 AM, Ben Pfaff wrote: > On Tue, Nov 12, 2013 at 07:36:23AM -0800, Jarno Rajahalme wrote: >> Add a "Performance" FAQ category. So far the only entry addresses the >> issue with using a new kernel module with an older (pre-megaflows) >> userspace

[ovs-dev] [PATCH] datapath: Change ovs_flow_tbl_lookup_xx() APIs for

2013-11-13 Thread Andy Zhou
API changes only. No functional chnages. Reported by: Ben Pfaff Signed-off-by: Andy Zhou --- datapath/datapath.c | 16 datapath/flow_table.c | 10 +- datapath/flow_table.h |4 +++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/datapath/data

Re: [ovs-dev] [PATCH] ofproto-dpif: test ARP SPA and TPA load actions

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:15:37PM +0900, Simon Horman wrote: > Signed-off-by: Simon Horman Applied, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ovs-ofctl: Document set_mpls_{label, tc} actions

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 10:54:17AM -0800, Ben Pfaff wrote: > On Wed, Nov 13, 2013 at 03:19:17PM +0900, Simon Horman wrote: > > Signed-off-by: Simon Horman > > --- > > utilities/ovs-ofctl.8.in | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/utilities/ovs-ofctl.8.in b/utili

Re: [ovs-dev] [PATCH] ofproto-dpif: test set_mpls_{label, tc} actions

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:18:44PM +0900, Simon Horman wrote: > Signed-off-by: Simon Horman Applied, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ovs-ofctl: Document mpls_{label, bos, tc} matches

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:16:18PM +0900, Simon Horman wrote: > Signed-off-by: Simon Horman Applied, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ovs-ofctl: Document masked versions of arp_sha and arp_tha matches

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:13:42PM +0900, Simon Horman wrote: > Document masked versions of arp_sha and arp_tha matches. > Also update documentation of unmasked versions of these > matches to include an example address as is the case with > the documentation of dl_src and dl_dst. > > Signed-off-by

Re: [ovs-dev] [PATCH] ovs-ofctl: Document set_mpls_{label, tc} actions

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:19:17PM +0900, Simon Horman wrote: > Signed-off-by: Simon Horman > --- > utilities/ovs-ofctl.8.in | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in > index f8feb6d..7c31386 100644 > --- a/utilities/ovs

Re: [ovs-dev] [datapath 2/2] datapath: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).

2013-11-13 Thread Andy Zhou
The number of masks in the datapath should not be large. But saving memory is a good thing at any time. The change looks good to me. Acked-by: Andy Zhou On Wed, Nov 13, 2013 at 9:54 AM, Ben Pfaff wrote: > We won't normally have a ton of flow masks but using a size_t to store > values no bigg

Re: [ovs-dev] [PATCH] OPENFLOW-1.1+: Update MPLS items

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:17:54PM +0900, Simon Horman wrote: > * MPLS BoS match is supported as much as other MPLS matches. > That is, all that is missing is the kernel datapath side > which is part my pending patchset. > > * The rework of tag order does require work but it is > covered by

Re: [ovs-dev] [datapath 1/2] datapath: Correct comment.

2013-11-13 Thread Andy Zhou
The comment change is fine. Not related to the comment, I am not happy with the abstraction of flow_mask_insert() -- passing in flow, and setting up flow->mask should not be part of the insert() function. A better function name may help. I did not come up with a better one. On the other hand, ho

Re: [ovs-dev] [PATCH] ofp-actions: Account for OF version when enforcing action consistency

2013-11-13 Thread Ben Pfaff
On Tue, Nov 05, 2013 at 05:34:34PM +0900, Simon Horman wrote: > Some different versions of OpenFlow require different consistency > checking. This patch allows for three different variants to be checked. > > 1. OpenFlow1.0 > >This variant implicitly pushes a VLAN tag if one doesn't exist >

Re: [ovs-dev] [datapath 0/2] minor datapath improvements

2013-11-13 Thread Andy Zhou
Ben is right, the other way around will read better. I will send out a patch to fix this. On Wed, Nov 13, 2013 at 10:00 AM, Justin Pettit wrote: > On Nov 13, 2013, at 9:54 AM, Ben Pfaff wrote: > > > La la la, does anyone ever read part 0 of a patch series? > > That's the best part. Everythin

Re: [ovs-dev] [PATCH v2] dpif-netdev: Introduce a classifier in userspace datapath.

2013-11-13 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 08:32:32AM -0800, Gurucharan Shetty wrote: > On Tue, Nov 12, 2013 at 3:59 PM, Ben Pfaff wrote: > > On Mon, Nov 04, 2013 at 06:23:54AM -0800, Gurucharan Shetty wrote: > >> Instead of an exact match flow table, we introduce a classifier. > >> This enables mega-flows in usersp

Re: [ovs-dev] [datapath 0/2] minor datapath improvements

2013-11-13 Thread Justin Pettit
On Nov 13, 2013, at 9:54 AM, Ben Pfaff wrote: > La la la, does anyone ever read part 0 of a patch series? That's the best part. Everything else is just details. --Justin ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listin

[ovs-dev] [datapath 1/2] datapath: Correct comment.

2013-11-13 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- datapath/flow_table.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/datapath/flow_table.c b/datapath/flow_table.c index ddb14da..4804db0 100644 --- a/datapath/flow_table.c +++ b/datapath/flow_table.c @@ -519,11 +519,7 @@ static struct sw_

[ovs-dev] [datapath 0/2] minor datapath improvements

2013-11-13 Thread Ben Pfaff
Just a couple of things I noticed while reviewing Guru's userspace datapath patch yesterday. La la la, does anyone ever read part 0 of a patch series? Just in case, I noticed another oddity in the datapath but I don't have a patch to propose: normally, __function() is a wrapper around function(),

[ovs-dev] [datapath 2/2] datapath: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).

2013-11-13 Thread Ben Pfaff
We won't normally have a ton of flow masks but using a size_t to store values no bigger than sizeof(struct sw_flow_key) seems excessive. This reduces sw_flow_key_range and sw_flow_mask by 4 bytes on 32-bit systems. On 64-bit systems it shrinks sw_flow_key_range by 12 bytes but sw_flow_mask only b

Re: [ovs-dev] [PATCH v2] dpif-netdev: Introduce a classifier in userspace datapath.

2013-11-13 Thread Gurucharan Shetty
On Tue, Nov 12, 2013 at 3:59 PM, Ben Pfaff wrote: > On Mon, Nov 04, 2013 at 06:23:54AM -0800, Gurucharan Shetty wrote: >> Instead of an exact match flow table, we introduce a classifier. >> This enables mega-flows in userspace datapath. >> >> Signed-off-by: Gurucharan Shetty > > dp_netdev_lookup_

Re: [ovs-dev] [PATCH] linux: Signal datapath that unaligned Netlink message can be received

2013-11-13 Thread Thomas Graf
On 11/13/2013 07:11 AM, Jesse Gross wrote: On Mon, Nov 11, 2013 at 11:53 PM, Thomas Graf wrote: On 11/11/2013 04:50 PM, Ben Pfaff wrote: On Mon, Nov 11, 2013 at 04:36:24PM +0100, Thomas Graf wrote: Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal th

Re: [ovs-dev] [PATCH] ovs-ofctl: Document masked versions of arp_sha and arp_tha matches

2013-11-13 Thread Simon Horman
On Wed, Nov 13, 2013 at 03:14:35PM +0900, Simon Horman wrote: > Document masked versions of arp_sha and arp_tha matches. > > Also update documentation of unmasked versions of these > matches to include an example address as is the case with > the documentation of dl_src and dl_dst. Sorry, I manag

[ovs-dev] [PATCH] ovs-ofctl: Document arp_spa and arp_tpa matches

2013-11-13 Thread Simon Horman
Signed-off-by: Simon Horman --- utilities/ovs-ofctl.8.in | 11 +++ 1 file changed, 11 insertions(+) diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index f8feb6d..27c85b5 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -923,6 +923,17 @@ The \fBip_

Re: [ovs-dev] [PATCH v2 7/8] rconn: Allow OFPMP_TABLE_FEATURES openflow messages.

2013-11-13 Thread Simon Horman
On Wed, Nov 06, 2013 at 10:46:12PM +0800, Alexander Wu wrote: > > V2: > No change. > > V1: > Make the enums allowed > > Signed-off-by: Alexander Wu Reviewed-by: Simon Horman > --- > lib/rconn.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/rconn.c

Re: [ovs-dev] [PATCH v2 6/8] ofctl: Add ovs-ofctl dump-table-features.

2013-11-13 Thread Simon Horman
On Wed, Nov 06, 2013 at 10:46:10PM +0800, Alexander Wu wrote: > > V2: > No change > > V1: > Now the cli we implement is very crude. Maybe it could > display better. > > Signed-off-by: Alexander Wu Reviewed-by: Simon Horman > --- > utilities/ovs-ofctl.c | 17 + > 1 fi

Re: [ovs-dev] [PATCH v2 5/8] ofp-print: Implement the function to print OFPMP_TABLE_FEATURES

2013-11-13 Thread Simon Horman
On Wed, Nov 06, 2013 at 10:46:07PM +0800, Alexander Wu wrote: > > V2: > Change calls of ofputil. > Fix CodingStyle accoring to Simon Horman's suggestions. > > V1: > Add function to print OFPMP_TABLE_FEATURES. > But now the print is crude and dirty. > Fix it to bitmap or more desc later.

Re: [ovs-dev] [PATCH v2 2/8] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-11-13 Thread Simon Horman
On Wed, Nov 06, 2013 at 10:45:31PM +0800, Alexander Wu wrote: > > V2: > Restructure implement of OFPMP_TABLE_FEATURES > Change decode_*_raw to normalized pull functions > > 1. add macros and funcs to en/decode table features > 2. restructure OFPMP_TABLE_FEATURES en/decode function >

Re: [ovs-dev] [PATCH v2 4/8] ofproto: Add init/destroy funcs and handle OFPMP_TABLE_FEATURES msgs.

2013-11-13 Thread Simon Horman
On Wed, Nov 06, 2013 at 10:46:04PM +0800, Alexander Wu wrote: > > V2: > 1. fix function align, align to 79 bytes, fix BE64 to UINT64, etc. > 2. fix n_tables_miss init type. > 3. Change calls from ofputil. > > Simon Horman suggestions: > 1. Fix CodingStyle, some coding error. > 2. Fix th

Re: [ovs-dev] [PATCH v2 3/8] ofproto-provider: Add/Modify headers for OFPMP_TABLE_FEATURES in ofproto

2013-11-13 Thread Simon Horman
I think it would be quite helpful if you added some text describing the relationship between tf and otf: a) in the changelog b) above otf c) above tf On Wed, Nov 06, 2013 at 10:45:52PM +0800, Alexander Wu wrote: > > V2: > No change. > > V1: > Add table_feature structs in ofproto && oftable