Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Suppress sparse warning.

2014-07-27 Thread Joe Stringer
http://openvswitch.org/pipermail/dev/2014-July/043119.html ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] dpif-provider: Get rid of redundant operations.

2014-08-06 Thread Joe Stringer
On 16 July 2014 11:09, Ben Pfaff wrote: > The dpif provider 'operate' call duplicates all of the features available > from the 'flow_put', 'flow_del', and 'execute' calls, yielding redundant > code in providers that support both mechanisms. This change drops the > latter calls in favor of making

[ovs-dev] [PATCHv2] dpif: Support flow_get in dpif_operate().

2014-08-12 Thread Joe Stringer
This cleans up the dpif interface to make it more consistent with the other dpif operations, and allows flows to be fetched in batches. Signed-off-by: Joe Stringer --- v2: Require callers to pass down an initialized buffer. Remove NLM_F_ECHO flag from get request. Rebase against master

Re: [ovs-dev] [PATCHv2] dpif: Support flow_get in dpif_operate().

2014-08-13 Thread Joe Stringer
Thanks for the review, I plan to push with the following changes (I noticed that the other dpif-linux operations - PUT,DEL have redundant memsets, so deleting them too): diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index e767d9f..c4420f4 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@

[ovs-dev] [PATCH 1/3] datapath: Minor style fixup.

2014-08-14 Thread Joe Stringer
Signed-off-by: Joe Stringer --- datapath/flow_table.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/flow_table.c b/datapath/flow_table.c index 7046623..f80e889 100644 --- a/datapath/flow_table.c +++ b/datapath/flow_table.c @@ -446,7 +446,7 @@ static void

[ovs-dev] [PATCH 2/3] datapath: Make __parse_flow_nlattrs() more generic.

2014-08-14 Thread Joe Stringer
This allows future patches to reuse the nla error detection code, by passing their own definitions for expected attribute lengths and types. Signed-off-by: Joe Stringer --- datapath/flow_netlink.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff

[ovs-dev] [PATCH 3/3] datapath: Reuse parse_nlattrs() for IPv4 tunnels.

2014-08-14 Thread Joe Stringer
Signed-off-by: Joe Stringer --- datapath/flow_netlink.c | 85 ++- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 933b2a1..01f6e49 100644 --- a/datapath/flow_netlink.c +++ b

Re: [ovs-dev] [PATCHv2 1/2] datapath: Move key_attr_size() to flow_netlink.h.

2014-08-14 Thread Joe Stringer
On 14 August 2014 10:22, Pravin Shelar wrote: > > Can you move this definition next to ovs_key_lens definition. > > otherwise looks good. > Acked-by: Pravin B Shelar Thanks, I made this change and pushed this to master. ___ dev mailing list dev@openvs

Re: [ovs-dev] [PATCH 2/3] datapath: Make __parse_flow_nlattrs() more generic.

2014-08-16 Thread Joe Stringer
On 16 August 2014 10:02, Pravin Shelar wrote: > > This is good idea. I think we can improve it even further. > There is nla_parse() function in netlink which does attribute parsing, > but it is not as strict as OVS needs. Can you look into improving the > API or adding another API which works for

Re: [ovs-dev] [DPDK Upcalls v2 3/3] dpif-netdev: Streamline miss handling.

2014-08-17 Thread Joe Stringer
On 13 August 2014 06:24, Ben Pfaff wrote: > > dp_netdev_flow_add() goes to some trouble to log matches as if they > were provided as datapath flows, even though they aren't. I think > that match_format() would be simpler and probably less confusing. In the majority of cases, I agree---however t

[ovs-dev] [RFC 02/14] dpif: Zero flow before dpif_flow_get().

2014-08-20 Thread Joe Stringer
Signed-off-by: Joe Stringer --- lib/dpif.c |1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif.c b/lib/dpif.c index b2a1972..1a32ef6 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -840,6 +840,7 @@ dpif_flow_get(struct dpif *dpif, struct dpif_op *opp; struct dpif_op op

[ovs-dev] [RFC 01/14] tests: Fix race conditions.

2014-08-20 Thread Joe Stringer
These tests had the potential to fail due to statistics not updating before the test script retrieves them. Fix them by waiting until the next revalidation cycle. Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at |6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/ofproto

[ovs-dev] [RFC 00/14] Revalidate flows with unique identifiers.

2014-08-20 Thread Joe Stringer
of the new interface for datapath flow commands. The linux datapath implementation of these features is yet to come. Previous testing with a linux datapath implementation using a 64-bit identifier showed reasonable performance improvements over master. I plan to rework that code and send it for review next

[ovs-dev] [RFC 03/14] revalidator: Use 'cmap' for storing ukeys.

2014-08-20 Thread Joe Stringer
Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 61 ++--- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 5f1d6d5..bccd7e8 100644 --- a/ofproto/ofproto-dpif

[ovs-dev] [RFC 08/14] upcall: Revalidate using cache of mask, actions.

2014-08-20 Thread Joe Stringer
fields optional. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 119 ++--- 1 file changed, 51 insertions(+), 68 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 6f55216..aaf64ed 100644 --- a/ofproto

[ovs-dev] [RFC 12/14] dpif-netdev: Support unique flow identifiers.

2014-08-20 Thread Joe Stringer
Signed-off-by: Joe Stringer --- lib/dpif-netdev.c | 209 --- lib/flow.h |6 ++ tests/dpif-netdev.at|3 + tests/ofproto-dpif.at | 20 +++-- tests/ofproto-macros.at |1 + 5 files changed, 164 insertions(+), 75

[ovs-dev] [RFC 11/14] upcall: Generate unique flow identifiers.

2014-08-20 Thread Joe Stringer
that two flows hash to the same value, the latter flow will not be installed. For backward compatibility, flows that are dumped with no ukey will be hashed in the same manner at dump time. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 205

[ovs-dev] [RFC 13/14] dpif-linux: Support unique flow identifiers.

2014-08-20 Thread Joe Stringer
Signed-off-by: Joe Stringer --- lib/dpif-linux.c | 91 +- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index f4e78a1..a5f4182 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c

[ovs-dev] [RFC 04/14] revalidator: Protect ukeys with a mutex.

2014-08-20 Thread Joe Stringer
ukey collections to be read or modified while a revalidator is garbage collecting it. To protect the ukeys, this patch adds locking on the ukey collection. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 29 + 1 file changed, 21 insertions(+), 8

[ovs-dev] [RFC 06/14] upcall: Rename dump_op -> ukey_op.

2014-08-20 Thread Joe Stringer
Future patches will make use of the 'struct dump_op' in a broader sense, so this patch renames it to make things a bit clearer. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 95 + 1 file changed, 48 insertions(+), 47 deletion

[ovs-dev] [RFC 09/14] hash: Add 128-bit murmurhash.

2014-08-20 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- There is also a version for 64-bit systems which I haven't tried yet, mostly because this version provides the same

[ovs-dev] [RFC 07/14] upcall: Create ukeys in handler threads.

2014-08-20 Thread Joe Stringer
he handler threads, during flow setup. This allows future patches to reduce the cost of flow dumping. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 327 - 1 file changed, 222 insertions(+), 105 deletions(-) diff --git a/ofproto/of

[ovs-dev] [RFC 10/14] dpif: Add Unique flow identifiers.

2014-08-20 Thread Joe Stringer
. For each flow dump, the dpif user specifies which fields may be omitted, allowing the common case to only dump a pair of 128-bit ID and flow stats. Signed-off-by: Joe Stringer --- datapath/linux/compat/include/linux/openvswitch.h | 26 +++ lib/dpctl.c

[ovs-dev] [RFC 14/14] revalidator: Reduce ukey contention.

2014-08-20 Thread Joe Stringer
, which is raised when flow setup is complete. By checking this flag before attempting to perform a trylock(), we can reduce lock contention between handler and revalidator threads. Signed-off-by: Joe Stringer --- This patch is particularly relevant after the linux datapath implementation of UID

[ovs-dev] [RFC 05/14] udpif: Separate ukey maps from revalidators.

2014-08-20 Thread Joe Stringer
maps from the revalidators, and increases the number of maps used to store ukeys, to reduce contention. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 155 +++-- 1 file changed, 87 insertions(+), 68 deletions(-) diff --git a/ofproto/ofproto

Re: [ovs-dev] [RFC 00/14] Revalidate flows with unique identifiers.

2014-08-22 Thread Joe Stringer
Hi Jarno, There's been a few iterations. The previous 64-bit version was using a 32-bit hash combined with a thread ID. The 128-bit hash was based on a suggestion to have sufficient bits to randomly generate the identifiers, however I've since shifted to using the hash of the flow key---This allo

Re: [ovs-dev] [PATCH 1/4] ofproto-dpif-xlate: Only learn MAC addresses upon handling packets.

2014-08-24 Thread Joe Stringer
On 23 August 2014 10:47, Ben Pfaff wrote: > MAC learning, like flow entry learning via the "learn" action, should only > happen if a packet was actually received. > > Signed-off-by: Ben Pfaff Acked-by: Joe Stringer __

Re: [ovs-dev] [PATCH 2/4] ofproto-dpif-xlate: Skip pushing stats if there are no packets to push.

2014-08-24 Thread Joe Stringer
ackets, then no packets could have hit actions for things such as mac learning/openflow learning. So I'd expect it to be a no-op. Acked-by: Joe Stringer ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 3/4] ofproto-dpif-xlate: Drop 'may_learn' parameter from xlate_push_stats().

2014-08-24 Thread Joe Stringer
s entirely from the > cases that previously only ran if 'may_learn'. > > Signed-off-by: Ben Pfaff > Acked-by: Joe Stringer ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 4/4] ofproto-dpif-upcall: Attribute statistics to OpenFlow flows more precisely.

2014-08-24 Thread Joe Stringer
On 23 August 2014 10:47, Ben Pfaff wrote: > OpenFlow packet and byte counters have always been something of an > approximation in Open vSwitch. First, they are updated only periodically. > Second, they can be misattributed because statistics collection does a > retranslation and gives the statis

Re: [ovs-dev] [RFC 02/14] dpif: Zero flow before dpif_flow_get().

2014-08-24 Thread Joe Stringer
On 23 August 2014 06:29, Ben Pfaff wrote: > On Thu, Aug 21, 2014 at 05:41:57PM +1200, Joe Stringer wrote: > > Signed-off-by: Joe Stringer > > My reading of the code is that this is redundant because > dpif_operate() always fills in the flow. > Right, this is needed in a l

Re: [ovs-dev] [RFC 03/14] revalidator: Use 'cmap' for storing ukeys.

2014-08-24 Thread Joe Stringer
On 23 August 2014 06:47, Ben Pfaff wrote: > On Thu, Aug 21, 2014 at 05:41:58PM +1200, Joe Stringer wrote: > > Signed-off-by: Joe Stringer > > As of this patch, there isn't an advantage to using a cmap yet, right? > Not yet, no. Cmaps become useful when access is spread

Re: [ovs-dev] [RFC 04/14] revalidator: Protect ukeys with a mutex.

2014-08-24 Thread Joe Stringer
On 23 August 2014 08:01, Ben Pfaff wrote: > On Thu, Aug 21, 2014 at 05:41:59PM +1200, Joe Stringer wrote: > > Currently, ukeys are protected during revalidator_sweep__() as only one > > thread accesses the ukey at a time. This is ensured using barriers: > > all revalidat

Re: [ovs-dev] [RFC 05/14] udpif: Separate ukey maps from revalidators.

2014-08-24 Thread Joe Stringer
On 23 August 2014 07:59, Ben Pfaff wrote: > n_umaps is now a hard-coded constant, but a lot of the code assumes > that it can vary. It would be very slightly simpler to actually use a > macro or enum to define the fixed size instead of a variable. It > would also allow better code generation in

Re: [ovs-dev] [RFC 07/14] upcall: Create ukeys in handler threads.

2014-08-26 Thread Joe Stringer
On 27 August 2014 06:09, Ben Pfaff wrote: > On Thu, Aug 21, 2014 at 05:42:02PM +1200, Joe Stringer wrote: > > Currently, when a revalidator thread first dumps a flow, it creates a > > 'udpif_key' object and caches a copy of a kernel flow key. This allows > &g

[ovs-dev] [PATCH 1/2] datapath: Add nla_parse_strict().

2014-08-26 Thread Joe Stringer
This function allows netlink attributes to be parsed more strictly, to check for duplicate attributes, attribute max lengths, and detecting attributes with only non-zero values. Signed-off-by: Joe Stringer --- acinclude.m4 |2 + datapath/linux/Modules.mk

[ovs-dev] [PATCH 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-08-26 Thread Joe Stringer
Signed-off-by: Joe Stringer --- datapath/flow_netlink.c | 219 +++ 1 file changed, 86 insertions(+), 133 deletions(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 69d1919..aa2cece 100644 --- a/datapath/flow_netlink.c +++ b

Re: [ovs-dev] [PATCH] datapath: remove flow member from struct ovs_skb_cb

2014-08-26 Thread Joe Stringer
I've been having a bit of trouble with ovs after this patch was applied, ovs-vswitchd locks up on Debian 7.6 (VBox VM). Kernel is 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux. I have a fairly typical phy bridge + int bridge setup, with dhclient running on br-int: # ovs-vsctl show

[ovs-dev] [RFCv2 00/12] Revalidate flows with unique identifiers.

2014-08-27 Thread Joe Stringer
RFCv2: - Revised early patches from v1 feedback - Rebased RFCv1: http://openvswitch.org/pipermail/dev/2014-August/044383.html Joe Stringer (12): revalidator: Use 'cmap' for storing ukeys. revalidator: Protect ukeys with a mutex. udpif: Separate udpif_key maps from revalidators

[ovs-dev] [RFCv2 01/12] revalidator: Use 'cmap' for storing ukeys.

2014-08-27 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v2: Call ovsrcu_quiesce() unconditionally. Added ack. RFC: Initial Post. --- ofproto/ofproto-dpif-upcall.c | 61 ++--- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/ofproto/ofproto

[ovs-dev] [RFCv2 03/12] udpif: Separate udpif_key maps from revalidators.

2014-08-27 Thread Joe Stringer
maps from the revalidators, and increases the number of maps used to store ukeys, to reduce contention. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting. Mention that 'ukeys' contains elements of type 's

[ovs-dev] [RFCv2 05/12] upcall: Create ukeys in handler threads.

2014-08-27 Thread Joe Stringer
he handler threads, during flow setup. This allows future patches to reduce the cost of flow dumping. Signed-off-by: Joe Stringer --- v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 334 - 1 file changed, 227 insertions(+), 107 deletion

[ovs-dev] [RFCv2 08/12] dpif: Add Unique flow identifiers.

2014-08-27 Thread Joe Stringer
. For each flow dump, the dpif user specifies which fields may be omitted, allowing the common case to only dump a pair of 128-bit ID and flow stats. Signed-off-by: Joe Stringer --- datapath/linux/compat/include/linux/openvswitch.h | 26 +++ lib/dpctl.c

[ovs-dev] [RFCv2 06/12] upcall: Revalidate using cache of mask, actions.

2014-08-27 Thread Joe Stringer
fields optional. Signed-off-by: Joe Stringer --- v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 119 ++--- 1 file changed, 51 insertions(+), 68 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index

[ovs-dev] [RFCv2 02/12] revalidator: Protect ukeys with a mutex.

2014-08-27 Thread Joe Stringer
these ukey collections to be read or modified while a revalidator is garbage collecting it. To protect the ukeys, this patch adds locking on the ukey collection. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v2: Added ack. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 29

[ovs-dev] [RFCv2 04/12] upcall: Rename dump_op -> ukey_op.

2014-08-27 Thread Joe Stringer
Future patches will make use of the 'struct dump_op' in a broader sense, so this patch renames it to make things a bit clearer. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v2: Added ack. RFC: First post. --- ofproto/ofproto-dpif-upcal

[ovs-dev] [RFCv2 07/12] hash: Add 128-bit murmurhash.

2014-08-27 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- There is also a version for 64-bit systems which I haven't tried yet, mostly because this version provides the same

[ovs-dev] [RFCv2 10/12] dpif-netdev: Support unique flow identifiers.

2014-08-27 Thread Joe Stringer
Signed-off-by: Joe Stringer --- lib/dpif-netdev.c | 210 --- lib/flow.h |6 ++ tests/dpif-netdev.at|3 + tests/ofproto-dpif.at | 20 +++-- tests/ofproto-macros.at |1 + 5 files changed, 165 insertions(+), 75

[ovs-dev] [RFCv2 09/12] upcall: Generate unique flow identifiers.

2014-08-27 Thread Joe Stringer
'handler_install_conflict'. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 198 ++--- ofproto/ofproto-dpif-upcall.h |3 + ofproto/ofproto-dpif.c| 103 +++-- ofproto/ofproto-dpif.h|2 + 4 files changed, 267

[ovs-dev] [RFCv2 12/12] revalidator: Reduce ukey contention.

2014-08-27 Thread Joe Stringer
, which is raised when flow setup is complete. By checking this flag before attempting to perform a trylock(), we can reduce lock contention between handler and revalidator threads. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 29 + 1 file c

[ovs-dev] [RFCv2 11/12] dpif-linux: Support unique flow identifiers.

2014-08-27 Thread Joe Stringer
Signed-off-by: Joe Stringer --- lib/dpif-linux.c | 91 +- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index f4e78a1..a5f4182 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c

Re: [ovs-dev] [PATCH] datapath: remove flow member from struct ovs_skb_cb

2014-08-27 Thread Joe Stringer
On 28 August 2014 10:34, Pravin Shelar wrote: > > > This is weird. I could not reproduce this on newer kernel. But I found > related bug. Can you try attached patch? It may be related. > I will submit formal patch later. > > --Pravin. > This patch doesn't fix the issue. Another slight variatio

Re: [ovs-dev] [PATCH 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-08-28 Thread Joe Stringer
On 29 August 2014 15:57, Pravin Shelar wrote: > > I have not finished review but I was wonder if you can get rid of the > attributes bit mask also? > Hi Pravin, I took a look, and I think I can reduce it down to just being inside match_validate() without much trouble. I don't have a good feel f

Re: [ovs-dev] [PATCH 1/2] datapath: Add nla_parse_strict().

2014-08-31 Thread Joe Stringer
An alternative interface, if we want this to be more flexible without adding new parameters for each possible variation is something like the following: diff --git a/datapath/linux/compat/include/linux/netlink.h b/datapath/linux/compat/include/linux/netlink.h index f172590..e3d29a2 100644 --- a/da

[ovs-dev] [RFCv3 07/13] hash: Add 128-bit murmurhash.

2014-09-02 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- v3: Rebase. There is also a version for 64-bit systems which I haven't tried yet, mostly because this version provide

[ovs-dev] [RFCv3 08/13] dpif: Add Unique flow identifiers.

2014-09-02 Thread Joe Stringer
. For each flow dump, the dpif user specifies which fields may be omitted, allowing the common case to only dump a pair of 128-bit ID and flow stats. Signed-off-by: Joe Stringer --- I'm still looking at whether it might be worth trying a 64-bit UID instead. Any feedback on this would be welcome

[ovs-dev] [RFCv3 01/13] revalidator: Use 'cmap' for storing ukeys.

2014-09-02 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v3: Rebase. v2: Call ovsrcu_quiesce() unconditionally. RFC: Initial Post. --- ofproto/ofproto-dpif-upcall.c | 61 ++--- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/ofproto/ofproto-dpif

[ovs-dev] [RFCv3 02/13] revalidator: Protect ukeys with a mutex.

2014-09-02 Thread Joe Stringer
these ukey collections to be read or modified while a revalidator is garbage collecting it. To protect the ukeys, this patch adds locking on the ukey collection. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 29

[ovs-dev] [RFCv3 06/13] upcall: Revalidate using cache of mask, actions.

2014-09-02 Thread Joe Stringer
fields optional. Signed-off-by: Joe Stringer --- v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 118 ++--- 1 file changed, 51 insertions(+), 67 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif

[ovs-dev] [RFCv3 04/13] upcall: Rename dump_op -> ukey_op.

2014-09-02 Thread Joe Stringer
Future patches will make use of the 'struct dump_op' in a broader sense, so this patch renames it to make things a bit clearer. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcal

[ovs-dev] [RFCv3 09/13] upcall: Generate unique flow identifiers.

2014-09-02 Thread Joe Stringer
'handler_install_conflict'. Signed-off-by: Joe Stringer --- v3: Rename the ovs-appctl commands from {en,dis}able-uid->*-terse-dump. Rebase. v2: No change. --- ofproto/ofproto-dpif-upcall.c | 198 ++--- ofproto/ofproto-dpif-upcall.h |3 + ofproto/o

[ovs-dev] [RFCv3 00/13] Revalidate flows with unique identifiers.

2014-09-02 Thread Joe Stringer
RFCv3: - Add datapath implementation - Minor fixes - Rebased RFCv2: - Revised early patches from v1 feedback - Add Acks from Ben - Rebased RFCv1: http://openvswitch.org/pipermail/dev/2014-August/044383.html Joe Stringer (13): revalidator: Use 'cmap' for storing ukeys. revalidato

[ovs-dev] [RFCv3 05/13] upcall: Create ukeys in handler threads.

2014-09-02 Thread Joe Stringer
he handler threads, during flow setup. This allows future patches to reduce the cost of flow dumping. Signed-off-by: Joe Stringer --- v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 334 - 1 file changed, 227 insertions(+), 107

[ovs-dev] [RFCv3 03/13] udpif: Separate udpif_key maps from revalidators.

2014-09-02 Thread Joe Stringer
maps from the revalidators, and increases the number of maps used to store ukeys, to reduce contention. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v3: Rebase. v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting. Mention that 'ukeys' contains elemen

[ovs-dev] [RFCv3 12/13] revalidator: Reduce ukey contention.

2014-09-02 Thread Joe Stringer
, which is raised when flow setup is complete. By checking this flag before attempting to perform a trylock(), we can reduce lock contention between handler and revalidator threads. Signed-off-by: Joe Stringer --- v3: No change. v2: No change. --- ofproto/ofproto-dpif-upcal

[ovs-dev] [RFCv3 10/13] dpif-netdev: Support unique flow identifiers.

2014-09-02 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v3: Rebase. v2: No change. --- lib/dpif-netdev.c | 211 --- lib/flow.h |6 ++ tests/dpif-netdev.at|3 + tests/ofproto-dpif.at | 20 +++-- tests/ofproto-macros.at |1 + 5 files

[ovs-dev] [RFCv3 11/13] dpif-linux: Support unique flow identifiers.

2014-09-02 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v3: Rebase. v2: No change. --- lib/dpif-linux.c | 91 +- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index a32a550..9e4f623 100644 --- a/lib/dpif-linux.c

[ovs-dev] [RFCv3 13/13] datapath: Add support for OVS_FLOW_ATTR_UID.

2014-09-02 Thread Joe Stringer
s returned through the operation. For instance, OVS_UID_F_SKIP_KEY allows the datapath to skip returning the key. Signed-off-by: Joe Stringer --- If the datapath is created using OVS_DP_F_INDEX_BY_UID then a user starts an older userspace (with no support for UID), the older userspace will be unable

Re: [ovs-dev] [RFCv3 13/13] datapath: Add support for OVS_FLOW_ATTR_UID.

2014-09-02 Thread Joe Stringer
On 2 September 2014 22:48, Joe Stringer wrote: > If a datapath is created with the flag OVS_DP_F_INDEX_BY_UID, then an > additional table_instance is added to the flow_table, which is indexed > by unique identifiers ("UID"). This can be manipulated using the flow > key as b

Re: [ovs-dev] [PATCH] datapath: Set packet egress_tun_info.

2014-09-07 Thread Joe Stringer
k+0x109/0x1f0 > [] netlink_rcv_skb+0xcb/0xd0 > [] genl_rcv+0x25/0x40 > [] netlink_unicast+0x2f2/0x310 > [] netlink_sendmsg+0x28c/0x3d0 > [] sock_sendmsg+0xef/0x120 > [] ___sys_sendmsg+0x416/0x430 > [] __sys_sendmsg+0x49/0x90 > [] sys_sendmsg+0x19/0x20 > [] system_c

[ovs-dev] [PATCHv4 00/12] Revalidate flows with unique identifiers.

2014-09-08 Thread Joe Stringer
arly patches from v1 feedback - Add Acks from Ben - Rebased RFCv1: http://openvswitch.org/pipermail/dev/2014-August/044383.html Joe Stringer (12): revalidator: Use 'cmap' for storing ukeys. revalidator: Protect ukeys with a mutex. udpif: Separate udpif_key maps from revalidators. upc

[ovs-dev] [PATCHv4 01/12] revalidator: Use 'cmap' for storing ukeys.

2014-09-08 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4: No change. v3: Rebase. v2: Call ovsrcu_quiesce() unconditionally. RFC: Initial Post. --- ofproto/ofproto-dpif-upcall.c | 61 ++--- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a

[ovs-dev] [PATCHv4 03/12] udpif: Separate udpif_key maps from revalidators.

2014-09-08 Thread Joe Stringer
maps from the revalidators, and increases the number of maps used to store ukeys, to reduce contention. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4: Increase N_UMAPS to 512. v3: Rebase. v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting. Mention that '

[ovs-dev] [PATCHv4 02/12] revalidator: Protect ukeys with a mutex.

2014-09-08 Thread Joe Stringer
these ukey collections to be read or modified while a revalidator is garbage collecting it. To protect the ukeys, this patch adds locking on the ukey collection. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif

[ovs-dev] [PATCHv4 04/12] upcall: Rename dump_op -> ukey_op.

2014-09-08 Thread Joe Stringer
Future patches will make use of the 'struct dump_op' in a broader sense, so this patch renames it to make things a bit clearer. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcal

[ovs-dev] [PATCHv4 05/12] upcall: Create ukeys in handler threads.

2014-09-08 Thread Joe Stringer
he handler threads, during flow setup. This allows future patches to reduce the cost of flow dumping. Signed-off-by: Joe Stringer --- v4: No change. v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 334 - 1 file changed, 227

[ovs-dev] [PATCHv4 10/12] revalidator: Reduce ukey contention.

2014-09-08 Thread Joe Stringer
, which is raised when flow setup is complete. By checking this flag before attempting to perform a trylock(), we can reduce lock contention between handler and revalidator threads. Signed-off-by: Joe Stringer --- v4: Use atomic_read_relaxed(). v3: No change. v2: No change. --- ofproto/ofproto-dpi

[ovs-dev] [PATCHv4 09/12] datapath: Add support for OVS_FLOW_ATTR_UID.

2014-09-08 Thread Joe Stringer
s returned through the operation. For instance, OVS_UID_F_SKIP_KEY allows the datapath to skip returning the key. Signed-off-by: Joe Stringer --- If the datapath is created using OVS_DP_F_INDEX_BY_UID then a user starts an older userspace (with no support for UID), the older userspace will be unable

[ovs-dev] [PATCHv4 11/12] revalidator: Distinguish new and duplicate flows.

2014-09-08 Thread Joe Stringer
We previously counted flows that have been installed during the current dump as duplicates, rather than recognising them as new flows. This patch separates the counters out for these two cases. Signed-off-by: Joe Stringer --- v4: Initial post. --- ofproto/ofproto-dpif-upcall.c | 13

[ovs-dev] [PATCHv4 07/12] hash: Add 128-bit murmurhash.

2014-09-08 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- v4: Minor comments and style fixes. v3: Rebase. --- include/openvswitch/types.h |5 ++ lib/hash.c

[ovs-dev] [PATCHv4 08/12] dpif: Add Unique flow identifiers.

2014-09-08 Thread Joe Stringer
simplifies backward compatibility handling in ofproto-dpif-upcall. Signed-off-by: Joe Stringer --- v4: Generate UID in dpif layer and pass up to ofproto-dpif-upcall. Fix bug where UID-based terse dump wasn't enabled by default. Skip sending flow key in flow_del. Fix race condit

[ovs-dev] [PATCHv4 06/12] upcall: Revalidate using cache of mask, actions.

2014-09-08 Thread Joe Stringer
fields optional. Signed-off-by: Joe Stringer --- v4: No change. v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 118 ++--- 1 file changed, 51 insertions(+), 67 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto

[ovs-dev] [PATCHv4 12/12] upcall: Distinguish duplicate upcalls from conflicts.

2014-09-08 Thread Joe Stringer
s are different for each functions). If the hashes are different, then we have generated the same UID hash for two different flows, and we should log a warning. Signed-off-by: Joe Stringer --- RFC. This is really unlikely, but we don't have any way of detecting this case currently. This makes

Re: [ovs-dev] [PATCHv4 12/12] upcall: Distinguish duplicate upcalls from conflicts.

2014-09-08 Thread Joe Stringer
On 9 September 2014 02:10, Jarno Rajahalme wrote: > > > On Sep 8, 2014, at 3:23 AM, Joe Stringer wrote: > > > > It's highly unlikely that two flows will hash to the same UID. However, > > we could handle multiple upcalls from the same flow. If we hash the

Re: [ovs-dev] [PATCHv4 00/12] Revalidate flows with unique identifiers.

2014-09-08 Thread Joe Stringer
On 8 September 2014 22:23, Joe Stringer wrote: > With v4 I've had a fairly good go at testing this series, for performance > comparison and also compatibility with mixed older/newer > datapath/userspace. > Master appears to be able to revalidate roughly 130-140K flows per

Re: [ovs-dev] [PATCH] datapath: Set packet egress_tun_info.

2014-09-08 Thread Joe Stringer
enl_lock+0x17/0x20 > [] genl_rcv+0x16/0x40 > [] netlink_unicast+0x2f2/0x310 > [] netlink_ack+0x109/0x1f0 > [] netlink_rcv_skb+0xcb/0xd0 > [] genl_rcv+0x25/0x40 > [] netlink_unicast+0x2f2/0x310 > [] netlink_sendmsg+0x28c/0x3d0 > [] sock_sendmsg+0xef/0x120 > [] ___sy

[ovs-dev] [PATCHv2 1/2] datapath: Add nla_parse_strict().

2014-09-10 Thread Joe Stringer
This function allows netlink attributes to be parsed more strictly, to check for additional constraints beyond those that nla_parse() checks for. Passing flags=0 to nla_parse_strict() implies the same behaviour as nla_parse(). Signed-off-by: Joe Stringer --- v2: Change nla_parse_strict

[ovs-dev] [PATCHv2 2/2] datapath: Use nla_parse_strict() for netlink parsing.

2014-09-10 Thread Joe Stringer
Reduce duplicate code by using nla_policy and nla_parse_strict(). Signed-off-by: Joe Stringer --- v2: Remove attrs bitmasks from most functions. Remove key/mask wrappers for parse_nlattrs(). Rebase against flag-based nla_parse_strict(). --- datapath/flow_netlink.c | 420

[ovs-dev] [PATCH] ofproto: Increase default datapath max_idle time.

2014-09-11 Thread Joe Stringer
improvement in the supported number of flows when operating around the flow_limit. Signed-off-by: Joe Stringer --- ofproto/ofproto.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 1b8709a..d60b198 100644 --- a/ofproto/ofproto.h +++ b

Re: [ovs-dev] [PATCH] ofproto: Increase default datapath max_idle time.

2014-09-14 Thread Joe Stringer
Thanks, applied to master. On 15 September 2014 09:41, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Thu, Sep 11, 2014 at 3:03 PM, Joe Stringer > wrote: > > The datapath max_idle value determines how long to wait before deleting > > an idle datapath fl

[ovs-dev] [PATCHv5 00/12] Revalidate flows with unique identifiers.

2014-09-14 Thread Joe Stringer
fixes - Rebased RFCv2: - Revised early patches from v1 feedback - Add Acks from Ben - Rebased RFCv1: http://openvswitch.org/pipermail/dev/2014-August/044383.html Joe Stringer (12): revalidator: Use 'cmap' for storing ukeys. revalidator: Protect ukeys with a mutex. udpif: Separate udpi

[ovs-dev] [PATCHv5 01/12] revalidator: Use 'cmap' for storing ukeys.

2014-09-14 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4-v5: No change. v3: Rebase. v2: Call ovsrcu_quiesce() unconditionally. RFC: Initial Post. --- ofproto/ofproto-dpif-upcall.c | 61 ++--- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a

[ovs-dev] [PATCHv5 02/12] revalidator: Protect ukeys with a mutex.

2014-09-14 Thread Joe Stringer
these ukey collections to be read or modified while a revalidator is garbage collecting it. To protect the ukeys, this patch adds locking on the ukey collection. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4-v5: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto

[ovs-dev] [PATCHv5 03/12] udpif: Separate udpif_key maps from revalidators.

2014-09-14 Thread Joe Stringer
maps from the revalidators, and increases the number of maps used to store ukeys, to reduce contention. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v5: No change. v4: Increase N_UMAPS to 512. v3: Rebase. v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting. Mention

[ovs-dev] [PATCHv5 07/12] hash: Add 128-bit murmurhash.

2014-09-14 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- v5: No change. v4: Minor comments and style fixes. v3: Rebase. --- include/openvswitch/types.h |5 ++ lib/hash.c

[ovs-dev] [PATCHv5 04/12] upcall: Rename dump_op -> ukey_op.

2014-09-14 Thread Joe Stringer
Future patches will make use of the 'struct dump_op' in a broader sense, so this patch renames it to make things a bit clearer. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4-v5: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcal

[ovs-dev] [PATCHv5 05/12] upcall: Create ukeys in handler threads.

2014-09-14 Thread Joe Stringer
he handler threads, during flow setup. This allows future patches to reduce the cost of flow dumping. Signed-off-by: Joe Stringer --- v4-v5: No change. v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 334 - 1 file changed, 227

[ovs-dev] [PATCHv5 06/12] upcall: Revalidate using cache of mask, actions.

2014-09-14 Thread Joe Stringer
fields optional. Signed-off-by: Joe Stringer --- v5: Switch back to checking that the mask is more specific. v4: No change. v3: Rebase. v2: Rebase. RFC: First post. --- ofproto/ofproto-dpif-upcall.c | 105 - 1 file changed, 52 insertions(+), 53 deletions

[ovs-dev] [PATCHv5 08/12] dpif: Add Unique flow identifiers.

2014-09-14 Thread Joe Stringer
simplifies backward compatibility handling in ofproto-dpif-upcall. Signed-off-by: Joe Stringer --- v5: Always pass flow_key down to dpif, to improve error logging. Fix extraneous netflow_unref. Fix testsuite failure. Rebase. v4: Generate UID in dpif layer and pass up to ofproto-d

[ovs-dev] [PATCHv5 09/12] datapath: Add support for OVS_FLOW_ATTR_UID.

2014-09-14 Thread Joe Stringer
s returned through the operation. For instance, OVS_UID_F_SKIP_KEY allows the datapath to skip returning the key. Signed-off-by: Joe Stringer --- v5: No change. v4: Fix memory leaks. Log when triggering the older userspace issue above. v3: Initial post. --- datapath/

  1   2   3   4   5   6   7   8   9   10   >