Re: [ovs-dev] [PATCHv2 2/2] revalidator: Revalidate missed flows.

2014-07-07 Thread Joe Stringer
Thanks, I added that change and pushed to branch-2.3. A version of this series for master is available here: http://mail.openvswitch.org/pipermail/dev/2014-July/042507.html ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/

[ovs-dev] [PATCH] tests: Fix "megaflow disabled" test.

2014-07-07 Thread Joe Stringer
The previous 'grep' logic would occasionally catch unintended flows. There's no reason to check for these flows separately, so combine the two checks. Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

Re: [ovs-dev] [PATCH] tests: Fix "megaflow disabled" test.

2014-07-07 Thread Joe Stringer
Thanks, I applied this to master and branch-2.3. On 8 July 2014 13:17, Ansis Atteka wrote: > On Mon, Jul 7, 2014 at 6:01 PM, Joe Stringer > wrote: > > The previous 'grep' logic would occasionally catch unintended flows. > > There's no reason to check for these

Re: [ovs-dev] [PATCH] dpif-linux: Recheck the socket pointer existence before getting its pid.

2014-07-07 Thread Joe Stringer
On 8 July 2014 13:20, Alex Wang wrote: > > +/* Needs to check in case the socket pointer is changed in between > + * of holding the locks. */ Might be worth mentioning here that a known case is when the port is deleted while handling an upcall from that port. Acke

[ovs-dev] [RFC 1/2] datapath: Refactor ovs_flow_cmd_fill_info().

2014-07-09 Thread Joe Stringer
Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a dump reply. This will be used to streamline flow_dump in the next patch. Signed-off-by: Joe Stringer --- datapath/datapath.c | 87 --- 1 file changed, 69 insertions(+), 18

[ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-09 Thread Joe Stringer
-vswitchd [kernel.kallsyms] [k] mutex_unlock 1.52% ovs-vswitchd ovs-vswitchd[.] revalidator_sweep__.constprop.16 Suggested-by: Jesse Gross Signed-off-by: Joe Stringer --- I'm operating under the assumption that we can't just copy the version of the netlink key/mask dir

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Joe Stringer
Thanks for the review, On 10 July 2014 21:13, Thomas Graf wrote: > If I understand the code correctly the gain is only visible on > consecutive dumps of the same flow. How about constructing the cache > when you require it for the first time? That avoids the cost on flow > setup. Correct. My m

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Joe Stringer
On 11 July 2014 04:53, Flavio Leitner wrote: > Can we push the cache construction to later that it doesn't impact > either flow setup or flow dump? I.e. like a workqueue? I don't know > if we have such facility. I'm open to the idea, but completely unfamiliar with how these work. I can take a l

Re: [ovs-dev] [RFC v2] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Joe Stringer
On 11 July 2014 11:29, Daniele Di Proietto wrote: > -static void sw_flow_mask_set(struct sw_flow_mask *mask, > -struct sw_flow_key_range *range, u8 val) > +/* We expect the nlattr stream to be already validated */ > +static int nlattr_set(struct nlattr *attr, u8 val,

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-11 Thread Joe Stringer
On 11 July 2014 21:03, Thomas Graf wrote: > > Correct. My main concern with doing it the first time it is required, is > > how it's synchronised. Flow dump is RCU. I don't really know what the > > threadsafety requirements are for this code, or what options are > available > > to address this. Is

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-11 Thread Joe Stringer
On 12 July 2014 00:55, Thomas Graf wrote: > > Another sidenote: > > > Looking at the code, OVS does not handle NLM_F_DUMP_INTR in user space > yet > > > and the kernel dump does not call genl_dump_check_consistent() yet to > > > provide > > > the flag. So what can currently happen even without y

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-11 Thread Joe Stringer
On 12 July 2014 01:03, Thomas Graf wrote: > On 07/11/14 at 09:28am, Flavio Leitner wrote: > > On Fri, Jul 11, 2014 at 11:27:09AM +1200, Joe Stringer wrote: > > > On 11 July 2014 04:53, Flavio Leitner wrote: > > > > > > > Can we push the cache const

Re: [ovs-dev] [RFC 1/2] datapath: Refactor ovs_flow_cmd_fill_info().

2014-07-13 Thread Joe Stringer
On 10 July 2014 20:41, Thomas Graf wrote: > On 07/10/14 at 05:29pm, Joe Stringer wrote: > > Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a > > dump reply. This will be used to streamline flow_dump in the next patch. > > > > Signed-off-by: Joe S

Re: [ovs-dev] [RFC 1/2] datapath: Refactor ovs_flow_cmd_fill_info().

2014-07-13 Thread Joe Stringer
On 14 July 2014 13:05, Pravin Shelar wrote: > > @@ -734,9 +722,25 @@ static int ovs_flow_cmd_fill_info(struct datapath > *dp, > > err = ovs_nla_put_flow(dp, &flow->key, &flow->mask->key, skb); > > if (err) > > goto error; > > - > > nla_nest_end(skb, nla); >

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Joe Stringer
Isn't this here to cover the case where the datapath disappears when it is returned to the caller? (In which case, perhaps we could explain this in the comment) On 15 July 2014 09:55, Andy Zhou wrote: > Signed-off-by: Andy Zhou > --- > datapath/datapath.c | 1 - > 1 file changed, 1 deletion(

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Joe Stringer
On 15 July 2014 12:53, Jarno Rajahalme wrote: > > How about this: > > /* The caller must hold either rcu_read_lock or ovs_mutex to keep the > returned dp pointer valid. */ > This looks good. And I think it's better to have it at get_dp() rather than the callers, to help prevent future misuse of

Re: [ovs-dev] [PATCHv4 1/2] dpif: Support fetching flow mask via dpif_flow_get().

2014-07-14 Thread Joe Stringer
On 15 July 2014 12:11, Ben Pfaff wrote: > dpif_netdev_flow_get() calls dp_netdev_flow_get_actions() twice. I > did not check whether the actions could change in between. Please > change the code to just retrieve the actions once. > > Acked-by: Ben Pfaff > > As an additional optimization I thin

Re: [ovs-dev] [PATCHv4 1/2] dpif: Support fetching flow mask via dpif_flow_get().

2014-07-14 Thread Joe Stringer
On 15 July 2014 15:26, Ben Pfaff wrote: > > I notice that dpif_netdev_flow_dump_next() also does this optimization > for > > actions, but there's no mention of RCU in the dpif_flow_dump_next() API. > Do > > you think we should add a comment like this to dpif_flow_get() and > > dpif_flow_dump_next

Re: [ovs-dev] [PATCHv4 2/2] revalidator: Revalidate missed flows.

2014-07-14 Thread Joe Stringer
On 15 July 2014 12:13, Ben Pfaff wrote: > On Tue, Jul 08, 2014 at 11:04:05AM +1200, Joe Stringer wrote: > > If the datapath doesn't dump a flow for some reason, and the current > > dump is expected to revalidate all flows in the datapath, then perform > > revalidation f

[ovs-dev] [PATCH] dpif: Update documentation for RCU-protected actions.

2014-07-14 Thread Joe Stringer
these functions can be used. Signed-off-by: Joe Stringer --- lib/dpif-netdev.c |1 - lib/dpif-provider.h |6 -- lib/dpif.c | 11 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 21a4f56..9270873 100644

Re: [ovs-dev] [PATCHv4 1/2] dpif: Support fetching flow mask via dpif_flow_get().

2014-07-14 Thread Joe Stringer
On 15 July 2014 15:40, Joe Stringer wrote: > OK. I'll send a separate patch to add these comments. > The patch is here: http://openvswitch.org/pipermail/dev/2014-July/042695.html ___ dev mailing list dev@openvswitch.org http://openvswitch.

Re: [ovs-dev] [PATCH 1/4] dpif-linux: Avoid null dereference if all ports disappear.

2014-07-14 Thread Joe Stringer
to > try to access element 0 of the set of channels, dereferencing a null > pointer. > > This fixes the problem. > > I encountered this while looking at a bug that I had introduced during > development that caused the port dump to always be empty. It would be > difficult to encou

Re: [ovs-dev] [PATCH 2/4] netlink-socket: Refill comment to fit within 79 columns.

2014-07-14 Thread Joe Stringer
On 15 July 2014 09:10, Ben Pfaff wrote: > 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 3/4] netlink-socket: Fix handling socket allocation failure in nl_dump_start().

2014-07-14 Thread Joe Stringer
#x27;ve glanced sideways at this code a couple of times, but never seen the failures. Looks much safer with this patch. Acked-by: Joe Stringer ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 4/4] netlink-socket: Simplify multithreaded dumping to match Linux reality.

2014-07-14 Thread Joe Stringer
On 15 July 2014 09:10, Ben Pfaff wrote: > Commit 0791315e4d (netlink-socket: Work around kernel Netlink dump thread > races.) introduced a simple workaround for Linux kernel races in Netlink > dumps. However, the code remained more complicated than needed. This > commit simplifies it. > > The m

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

2014-07-15 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v2: First post. Side comment: OVS_KEY_ATTR_ETHERTYPE appears twice in this list. I guess it's not harmful to reserve a bit of extra space, but does anyone know why it's there twice? --- datapath/datapath.c

[ovs-dev] [PATCHv2 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-15 Thread Joe Stringer
% ovs-vswitchd [kernel.kallsyms] [k] _raw_spin_lock_bh + 3.43% ovs-vswitchd [kernel.kallsyms] [k] ovs_flow_tbl_dump_next Suggested-by: Jesse Gross Signed-off-by: Joe Stringer --- v2: Copy mask from userspace rather than constructing from sw_flow. RFC: First post. This version gets rid

Re: [ovs-dev] [PATCH] dpif: Update documentation for RCU-protected actions.

2014-07-15 Thread Joe Stringer
On 15 July 2014 19:19, Ben Pfaff wrote: > Acked-by: Ben Pfaff > > s/quiesce period/quiescent period/ in two places though. > Thanks, I made this adjustment and applied the patch to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.or

Re: [ovs-dev] [PATCHv2 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-15 Thread Joe Stringer
On 16 July 2014 12:15, Joe Stringer wrote: > > + ovs_nla_copy_flow(a[OVS_FLOW_ATTR_KEY], a[OVS_FLOW_ATTR_MASK], > + new_flow->nl_match_cache); I realised that this needs to be wrapped in a NULL check for "new_flow->nl_match_cache", in c

[ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-15 Thread Joe Stringer
% ovs-vswitchd [kernel.kallsyms] [k] _raw_spin_lock_bh + 3.43% ovs-vswitchd [kernel.kallsyms] [k] ovs_flow_tbl_dump_next Suggested-by: Jesse Gross Signed-off-by: Joe Stringer --- v3: Add error checking to ovs_nla_copy_flow() and its users. Allow nl_match_cache to fail allocation in

Re: [ovs-dev] [PATCH] stp: Make stp-disabled port forward stp bpdu packets.

2014-07-15 Thread Joe Stringer
On 16 July 2014 14:19, Alex Wang wrote: > Commit 0d1cee123a84 (stp: Fix bpdu tx problem in listening state) > makes ovs drop the stp bpdu packets if stp is not enabled on the > input port. However, when pif bridge is used and stp is enabled > on the integration bridge. The flow translation of s

Re: [ovs-dev] [PATCH 4/4] netlink-socket: Simplify multithreaded dumping to match Linux reality.

2014-07-15 Thread Joe Stringer
On 16 July 2014 05:55, Ben Pfaff wrote: > > The kernel shouldn't ever return EAGAIN if there's more data to dump. > When dumping is single-threaded (as in branch-1.11) or serialized (as > post-commit 0791315e4d), the kernel implements that correctly. When > dumping is multithreaded, the kernel ha

Re: [ovs-dev] [PATCHv2] netlink-socket: Simplify multithreaded dumping to match Linux reality.

2014-07-15 Thread Joe Stringer
ntioning in the code (might not be, given the kernel behaviour is decoupled from this code). Acked-by: Joe Stringer ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH V2] stp: Make stp-disabled port forward stp bpdu packets.

2014-07-15 Thread Joe Stringer
Acked-by: Joe Stringer On 16 July 2014 17:21, Alex Wang wrote: > Commit 0d1cee123a84 (stp: Fix bpdu tx problem in listening state) > makes ovs drop the stp bpdu packets if stp is not enabled on the > input port. However, when pif bridge is used and stp is enabled > on the integr

Re: [ovs-dev] [PATCH V2] stp: Make stp-disabled port forward stp bpdu packets.

2014-07-16 Thread Joe Stringer
U + * TX_BPDU/RX_BPDU: the port could generate/consume bpdus. > + * > + * FWD_BPDU: the port should should always forward the bpdus, > + * whether they are generated by the port or received > + * as incoming packets. >

Re: [ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-16 Thread Joe Stringer
On 17 July 2014 04:48, Ben Pfaff wrote: > On Wed, Jul 16, 2014 at 02:50:12PM +1200, Joe Stringer wrote: > > Converting the flow key and mask back into netlink format during flow > > dump is fairly expensive. By caching the userspace-provided versions of > > these during fl

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-16 Thread Joe Stringer
On 12 July 2014 00:55, Thomas Graf wrote: > On 07/11/14 at 11:29pm, Joe Stringer wrote: > > I'm skeptical of taking the ovs_lock(). The current patch performs this > > key/mask cache construction inside ovs_lock() as part of the critical > > section for flow install.

Re: [ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-17 Thread Joe Stringer
On 18 July 2014 05:19, Ben Pfaff wrote: > > > From datapath/README: > > > > - If the kernel's flow key includes more fields than the userspace > > version of the flow key, for example if the kernel decoded IPv6 > > headers but userspace stopped at the Ethernet type (because it > >

Re: [ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-17 Thread Joe Stringer
On 18 July 2014 10:53, Joe Stringer wrote: > Basically I'd be much more comfortable with the kernel generating its >> own flow key the first time it dumps a flow, then caching that. How >> much overhead does that have versus caching the userspace-provided >> flow key?

Re: [ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-20 Thread Joe Stringer
On 19 July 2014 06:13, Jesse Gross wrote: > It's true, the field ordering is not significant if you understand all > of the fields. The concern is that userspace may want to keep track of > flows even if it doesn't understand all of the fields (for example, it > can determine that the kernel prov

[ovs-dev] [PATCHv4] datapath: Cache netlink flow key, mask on flow_dump.

2014-07-20 Thread Joe Stringer
-vswitchd [kernel.kallsyms] [k] memset 3.41% ovs-vswitchd [kernel.kallsyms] [k] _raw_spin_lock_bh ... Signed-off-by: Joe Stringer --- v4: Construct the cache during the first flow dump. v3: Add error checking to ovs_nla_copy_flow() and its users. Allow nl_match_cache to fail allocation

Re: [ovs-dev] [PATCHv3] datapath: Cache netlink flow key, mask on flow_put.

2014-07-20 Thread Joe Stringer
On 21 July 2014 10:28, Joe Stringer wrote: > On 19 July 2014 06:13, Jesse Gross wrote: > >> It's true, the field ordering is not significant if you understand all >> of the fields. The concern is that userspace may want to keep track of >> flows even if it doesn&#

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

2014-07-20 Thread Joe Stringer
On 16 July 2014 12:15, Joe Stringer wrote: > Signed-off-by: Joe Stringer > This patch was previously required for the series "datapath: Cache netlink flow key, mask on flow_put.", but is no longer required for newer versions of that, as I've changed the approach.

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

2014-09-17 Thread Joe Stringer
On 18 September 2014 11:13, Ben Pfaff wrote: > On Mon, Sep 15, 2014 at 02:25:14PM +1200, Joe Stringer wrote: > > One of the limiting factors on the number of flows that can be supported > > in the datapath is the overhead of assembling flow dump messages in the > > datapa

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

2014-09-17 Thread Joe Stringer
Thanks for the review, On 18 September 2014 10:33, Ben Pfaff wrote: > On Mon, Sep 15, 2014 at 02:25:11PM +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 k

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

2014-09-17 Thread Joe Stringer
On 18 September 2014 10:53, Ben Pfaff wrote: > On Mon, Sep 15, 2014 at 02:25:12PM +1200, Joe Stringer wrote: > > This allows us to ignore most fields of a flow_dump, requiring only the > > flow key for looking up the ukey. Fetching flows can also be avoided in > > the corner

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

2014-09-17 Thread Joe Stringer
On 18 September 2014 11:03, Ben Pfaff wrote: > On Mon, Sep 15, 2014 at 02:25:13PM +1200, Joe Stringer wrote: > > Add the 128-bit murmurhash by Austin Appleby, for 32-bit systems from: > > http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp > > > >

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

2014-09-17 Thread Joe Stringer
Thanks for the review, comments inline On 17 September 2014 17:37, Pravin Shelar wrote: > On Wed, Sep 10, 2014 at 3:16 AM, Joe Stringer > wrote: > > Reduce duplicate code by using nla_policy and nla_parse_strict(). > > > Thanks for simplifying this code. I have couple of c

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

2014-09-17 Thread Joe Stringer
On 18 September 2014 13:02, Joe Stringer wrote: > >> > @@ -229,17 +244,19 @@ static bool match_validate(const struct >> sw_flow_match *match, >> > } >> > } >> > >> > - if ((key_attrs & key_expected) != key_e

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

2014-09-26 Thread Joe Stringer
aces - Various fixes 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 (14): revalidator: Distinguish new and duplicate flows

[ovs-dev] [PATCHv6 01/14] revalidator: Distinguish new and duplicate flows.

2014-09-26 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 --- v5-v6: No change. v4: Initial post. --- ofproto/ofproto-dpif-upcall.c

[ovs-dev] [PATCHv6 03/14] revalidator: Protect ukeys with a mutex.

2014-09-26 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-v6: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto

[ovs-dev] [PATCHv6 05/14] upcall: Rename dump_op -> ukey_op.

2014-09-26 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-v6: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcal

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

2014-09-26 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4-v6: 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] [PATCHv6 06/14] upcall: Create ukeys in handler threads.

2014-09-26 Thread Joe Stringer
istics for flows inserted using ovs-dpctl. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v6: Always call poll_block() in udpif_upcall_handler(). Reduce memory zeroing in upcall/ukey init code. Fix up extraneous netflow_unref(). Don't fetch 'recirc' in paths that alw

[ovs-dev] [PATCHv6 04/14] udpif: Separate udpif_key maps from revalidators.

2014-09-26 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 --- v6: No change. v4: Increase N_UMAPS to 512. v3: Rebase. v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting. Mention

[ovs-dev] [PATCHv6 08/14] tests: Mention binomial coefficient in hash tests.

2014-09-26 Thread Joe Stringer
This just makes it a bit easier for someone coming in fresh to do some searches and figure out what the description means. Signed-off-by: Joe Stringer --- v6: First post. --- tests/test-hash.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-hash.c b/tests

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

2014-09-26 Thread Joe Stringer
skip dumping these fields, so this cache will be used instead. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v6: Use atomic_read_relaxed() in ukey_create(). Simplify delete_op_init(). v5: Switch back to checking that the mask is more specific. v4: No change. v3: Rebase. v2: Rebase. RFC

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

2014-09-26 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, r150 from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer --- The x64 version is approximately 2x faster than x86 in the tests I ran. v6: Add version that uses 64-bit operations. Add tests for

[ovs-dev] [PATCHv6 10/14] dpif: Generate flow_hash for revalidators in dpif.

2014-09-26 Thread Joe Stringer
er patches will add support for datapaths to store and interpret this UID, in which case the dpif has a responsibility to pass it through transparently. Signed-off-by: Joe Stringer --- v6: Split out from "dpif: Add Unique flow identifiers." Store flow hash seed staticly for all d

[ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-09-26 Thread Joe Stringer
operation. For instance, OVS_UID_F_SKIP_KEY allows the datapath to skip returning the key (eg, during dump to reduce memory copy). Signed-off-by: Joe Stringer --- v6: Fix documentation for supporting UIDs between 32-128 bits. Minor style fixes. Rebase. v5: No change. v4: Fix memory leak

[ovs-dev] [PATCHv6 12/14] dpif: Index flows using unique identifiers.

2014-09-26 Thread Joe Stringer
for newer datapaths that support UID, while the latter is used for backwards compatibility. Signed-off-by: Joe Stringer --- v6: Split out from "dpif: Add Unique flow identifiers." Make sure that actions are fetched if terse=false. Add additional dpif.h documentation to de

[ovs-dev] [PATCHv6 13/14] dpif: Minimize memory copy for revalidation.

2014-09-26 Thread Joe Stringer
. Signed-off-by: Joe Stringer --- v6: Split out from "dpif: Add Unique flow identifiers." Rebase. v5: Always pass flow_key down to dpif, to improve error logging. Fix extraneous netflow_unref. Rebase. v4: Fix bug where UID-based terse dump wasn't enabled by defaul

[ovs-dev] [PATCHv6 14/14] udpif: Simplify storage of key, mask in udpif_key.

2014-09-26 Thread Joe Stringer
and simplifies mask comparison in revalidate_ukey(). Signed-off-by: Joe Stringer --- For reference, prior to this patchset the size of a udpif_key is 656, but the actions are not cached on master. This patch allows the entire patchset to have a negligible impact on the memory footprint while

[ovs-dev] [PATCH] bridge: Fix bug where IDL wakeup causes 100% CPU.

2014-09-29 Thread Joe Stringer
ps to reproduce: Unload/Reload kernel module && restart ovs-vswitchd. Signed-off-by: Joe Stringer --- I considered implementing this fix using ovsdb_idl_get_seqno() for the entire logic block, but concluded that it doesn't make sense to update the status whenever there is any kind of

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

2014-09-29 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 --- v3: Shift nla_parse_strict() from

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

2014-09-29 Thread Joe Stringer
Reduce duplicate code by using nla_policy and nla_parse_strict(). Signed-off-by: Joe Stringer --- v3: Fix match_validate() Make ovs_key_from_nlattrs(),metadata_from_nlattrs() not change the attrs they are given Remove extraneous check for duplicate attributes Use NLA_FLAG

Re: [ovs-dev] [PATCH] bridge: Fix bug where IDL wakeup causes 100% CPU.

2014-09-29 Thread Joe Stringer
September 2014 05:45, Alex Wang wrote: > Thx a lot for the fix, that was a bad move~ > > Acked-by: Alex Wang > > On Mon, Sep 29, 2014 at 3:09 AM, Joe Stringer > wrote: > >> Commit 9c537baf613a16e (bridge: Refactor the stats and status update.) >> inadvertently cha

Re: [ovs-dev] [PATCH] Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.

2014-09-29 Thread Joe Stringer
un with the silent flags? Acked-by: Joe Stringer On 27 September 2014 06:02, Ben Pfaff wrote: > On Wed, Sep 03, 2014 at 10:28:39AM -0700, Ben Pfaff wrote: > > The Open vSwitch "make" output was still pretty verbose even when > > configured with --enable-silent-rules. Th

Re: [ovs-dev] [PATCH] Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.

2014-09-29 Thread Joe Stringer
veloper builds, where if something fails in a way I don't understand > I can just rerun with V=1. > > On Tue, Sep 30, 2014 at 09:30:23AM +1300, Joe Stringer wrote: > > From the linked travis build, it seems like there's still a bit of > > verbosity on the testsuite bu

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

2014-09-29 Thread Joe Stringer
On 30 September 2014 09:30, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:13PM +1200, Joe Stringer wrote: > > Add the 128-bit murmurhash by Austin Appleby, r150 from: > > http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp > > > > Signed-off-by: Jo

Re: [ovs-dev] [PATCHv6 10/14] dpif: Generate flow_hash for revalidators in dpif.

2014-09-29 Thread Joe Stringer
On 30 September 2014 09:51, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:14PM +1200, Joe Stringer wrote: > > This patch shifts the responsibility for determining the hash for a flow > > from the revalidation logic down to the dpif layer. This assists in > > handling b

Re: [ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-09-29 Thread Joe Stringer
On 30 September 2014 10:10, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:15PM +1200, 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 uni

Re: [ovs-dev] [PATCHv6 12/14] dpif: Index flows using unique identifiers.

2014-09-29 Thread Joe Stringer
On 30 September 2014 10:15, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:16PM +1200, Joe Stringer wrote: > > This patch modifies the dpif interface to allow flows to be manipulated > > using a 128-bit identifier. This allows revalidator threads to perform > > datapath

Re: [ovs-dev] [PATCHv6 13/14] dpif: Minimize memory copy for revalidation.

2014-09-29 Thread Joe Stringer
On 30 September 2014 10:24, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:17PM +1200, Joe Stringer wrote: > > One of the limiting factors on the number of flows that can be supported > > in the datapath is the overhead of assembling flow dump messages in the > > datapath

Re: [ovs-dev] [PATCHv6 14/14] udpif: Simplify storage of key, mask in udpif_key.

2014-09-29 Thread Joe Stringer
On 30 September 2014 10:27, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:18PM +1200, Joe Stringer wrote: > > Previously we stored the netlink-formatted version of a flow key and > > mask in 'struct udpif_key'. This patch stores the original key,mask > > in t

Re: [ovs-dev] [PATCHv6 01/14] revalidator: Distinguish new and duplicate flows.

2014-09-29 Thread Joe Stringer
Thanks, applied to master. On 30 September 2014 08:54, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:05PM +1200, Joe Stringer wrote: > > We previously counted flows that have been installed during the current > > dump as duplicates, rather than recognising them as new flows.

Re: [ovs-dev] [PATCHv6 08/14] tests: Mention binomial coefficient in hash tests.

2014-09-29 Thread Joe Stringer
Thanks, applied to master. On 30 September 2014 08:57, Ben Pfaff wrote: > On Fri, Sep 26, 2014 at 09:28:12PM +1200, Joe Stringer wrote: > > This just makes it a bit easier for someone coming in fresh to do some > > searches and figure out what the description means. > > &

Re: [ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-09-30 Thread Joe Stringer
On 1 October 2014 06:56, Pravin Shelar wrote: > On Mon, Sep 29, 2014 at 3:59 PM, Joe Stringer > wrote: > > > > > > On 30 September 2014 10:10, Ben Pfaff wrote: > >> > >> On Fri, Sep 26, 2014 at 09:28:15PM +1200, Joe Stringer wrote: >

Re: [ovs-dev] [PATCH] bridge: Fix high cpu utilization.

2014-09-30 Thread Joe Stringer
witchd --log-file=fakelog & +pid=`echo $!` + +# sleep for a while +sleep 5 5 seems high, is this just to make sure that vswitchd gets a chance to fully initialize and go through the wait block once? Acked-by: Joe Stringer ___ dev mailing list dev@openv

Re: [ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-09-30 Thread Joe Stringer
On 1 October 2014 11:55, Pravin Shelar wrote: > On Tue, Sep 30, 2014 at 3:15 PM, Joe Stringer > wrote: > > > > > > On 1 October 2014 06:56, Pravin Shelar wrote: > >> > >> On Mon, Sep 29, 2014 at 3:59 PM, Joe Stringer > >> wrote: > &g

Re: [ovs-dev] [PATCH] bridge: Fix high cpu utilization.

2014-09-30 Thread Joe Stringer
gt; > > Yeah, also to maybe cumulate more logs, if there is something. > > How about changing it to 2 s? > > > >> Acked-by: Joe Stringer >> > > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] bridge: Fix high cpu utilization.

2014-09-30 Thread Joe Stringer
Maybe just stick with 5. On 1 October 2014 13:10, Alex Wang wrote: > Yeah, so should we use 5 seconds? or use ovs_wait() to wait on the number > of lines which could wait up to 10 seconds...? > > On Tue, Sep 30, 2014 at 4:14 PM, Joe Stringer > wrote: > >> I had a pl

Re: [ovs-dev] [PATCH] README: Adding github markup and travis-ci build status to github readme page.

2014-09-30 Thread Joe Stringer
On 1 October 2014 12:15, Pritesh Kothari wrote: > diff --git a/README.md b/README.md > new file mode 100644 > index 000..318f0e6 > --- /dev/null > +++ b/README.md > @@ -0,0 +1,114 @@ > + > +http://openvswitch.org";>Open vSwitch > + > + Markdown has syntax for headings and urls, could you us

Re: [ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-09-30 Thread Joe Stringer
On 1 October 2014 11:59, Joe Stringer wrote: > > > On 1 October 2014 11:55, Pravin Shelar wrote: > >> On Tue, Sep 30, 2014 at 3:15 PM, Joe Stringer >> wrote: >> > >> > >> > On 1 October 2014 06:56, Pravin Shelar wrote: >> >> &

Re: [ovs-dev] [PATCH] ovs-vswitchd.at: Fix "start additional ovs-vswitchd process" test

2014-09-30 Thread Joe Stringer
Thanks for fixing this. Acked-by: Joe Stringer On 1 October 2014 18:10, YAMAMOTO Takashi wrote: > NetBSD implementation of wc command outputs extra whitespaces > like the following. Tweak the test to success on such environments. > > % echo hoge|wc -l|hexdump -C > 000

Re: [ovs-dev] [PATCHv6 13/14] dpif: Minimize memory copy for revalidation.

2014-10-01 Thread Joe Stringer
On 30 September 2014 10:24, Ben Pfaff wrote: > I suspect that check_recirc() and check_uid() should pass > DPIF_FP_MODIFY as well as DPIF_FP_CREATE, just in case a previous run > of OVS was killed at just the right time to leave a straggler probe > flow in the datapath. > I checked on this, and

Re: [ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__

2014-10-01 Thread Joe Stringer
Hi Gur, looks straightforward. I have a few broad feedback points though: If you haven't read it yet, please take a look at the CONTRIBUTING file in the top of the source tree. I'm not sure what format this patch is in, but git won't accept it in my setup. I suspect it's due to the footer message

Re: [ovs-dev] [PATCH] bfd.at: Fix intermittent failure of test - flap_count.

2014-10-02 Thread Joe Stringer
Sounds good to me. Nice to hear confirmation from the overnight test. Might be worthwhile adding a short note above the line to explain that reducing the update interval prevents particular race conditions. Did you consider applying the same change to the CFM flap_count test? Acked-by: Joe

Re: [ovs-dev] [PATCH] ovs-vswitchd.at: Add test for switch over to another ovs-vswitchd.

2014-10-02 Thread Joe Stringer
Acked-by: Joe Stringer On 2 October 2014 07:44, Alex Wang wrote: > Test the switch over to inactive ovs-vswitchd process when user > kill the currently active ovs-vswitchd. > > Signed-off-by: Alex Wang > --- > tests/ovs-vswitchd.at | 41 +

Re: [ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__

2014-10-02 Thread Joe Stringer
Hmm. This time the patch is littered with extra spaces all through the email. If you're able to use them, "git format-patch" and "git send-email" is a good way to send your patches out reliably without mail clients interfering with the presentation of the patch. I took a look at the group deletio

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

2014-10-06 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v4-v7: 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] [PATCHv7 00/11] Revalidate flows with unique identifiers.

2014-10-06 Thread Joe Stringer
s fixes 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 (11): revalidator: Use 'cmap' for storing ukeys. revalida

[ovs-dev] [PATCHv7 02/11] revalidator: Protect ukeys with a mutex.

2014-10-06 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-v7: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto

[ovs-dev] [PATCHv7 03/11] udpif: Separate udpif_key maps from revalidators.

2014-10-06 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 --- v6-v7: No change. v4: Increase N_UMAPS to 512. v3: Rebase. v2: #define N_UMAPS. Simplify upcall_unixctl_show() element counting

[ovs-dev] [PATCHv7 04/11] upcall: Rename dump_op -> ukey_op.

2014-10-06 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 --- v7: Rebase. v4-v6: No change. v3: Rebase. v2: No change. RFC: First post. --- ofproto/ofproto-dpif-upcal

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

2014-10-06 Thread Joe Stringer
skip dumping these fields, so this cache will be used instead. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v7: Rebase against ukey_create() changes in previous patch. v6: Use atomic_read_relaxed() in ukey_create(). Simplify delete_op_init(). v5: Switch back to checking that the mask

[ovs-dev] [PATCHv7 05/11] upcall: Create ukeys in handler threads.

2014-10-06 Thread Joe Stringer
happen in corner cases such as when ovs-vswitchd is restarted (and flows remain in the datapath) or a user installs a flow using ovs-dpctl. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v7: Create ukeys in revalidator threads in corner cases. v6: Always call poll_block() in udpif_upca

[ovs-dev] [PATCHv7 07/11] hash: Add 128-bit murmurhash.

2014-10-06 Thread Joe Stringer
Add the 128-bit murmurhash by Austin Appleby, r150 from: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- v7: Replace getblock*() with get_unaligned_u*(). Add ovs_u128_equal() function rather than using memcmp

[ovs-dev] [PATCHv7 10/11] dpif: Index flows using unique identifiers.

2014-10-06 Thread Joe Stringer
for newer datapaths that support UID, while the latter is used for backwards compatibility. Signed-off-by: Joe Stringer --- v7: Shift UID terseness flag below the dpif layer Remove OVS_DP_F_INDEX_BY_UID Use ovs_u128_equal(). Don't use 'static bool' for dpif_n

<    5   6   7   8   9   10   11   12   13   14   >