Re: [ovs-dev] [PATCH 2/4] lib/classifier: Change a variable name.

2014-07-15 Thread YAMAMOTO Takashi
> On Fri, Jul 11, 2014 at 04:55:55AM -0700, Jarno Rajahalme wrote: >> This stylistic change makes the following patch a bit simpler. >> >> Signed-off-by: Jarno Rajahalme > > It's hard for me to see the difference between m_bits and n_bits in > some of the fonts I use, and a 1-character differenc

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 integration bridge.

Re: [ovs-dev] [PATCH 4/4] lib/classifier: Clarify subtable skipping.

2014-07-15 Thread YAMAMOTO Takashi
> On Fri, Jul 11, 2014 at 04:55:57AM -0700, Jarno Rajahalme wrote: >> Clarify comments for trie-based subtable skipping. >> >> Perform the cheaper check first. >> >> Signed-off-by: Jarno Rajahalme > > Acked-by: Ben Pfaff Acked-by: YAMAMOTO Takashi

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

2014-07-15 Thread Alex Wang
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 stp bpdu packets will go through a level of resubmi

Re: [ovs-dev] [PATCH 1/4] lib/classifier: Unify struct classifier and cls_classifier.

2014-07-15 Thread YAMAMOTO Takashi
> /* A flow classifier. */ > struct classifier { > -struct cls_classifier *cls; > +struct ovs_mutex mutex; > +int n_rules OVS_GUARDED;/* Total number of rules. */ > +uint8_t n_flow_segments; > +uint8_t flow_segments[CLS_MAX_INDICES]; /* Flow segment boundaries to use >

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

2014-07-15 Thread Joe Stringer
On 16 July 2014 05:58, 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

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

[ovs-dev] [PATCH] cmap: Fix cmap_next_position()

2014-07-15 Thread Daniele Di Proietto
cmap_next_position() didn't update the node pointer while iterating through a list of nodes with the same hash. This commit fixes the bug and improve test-cmap to detect it. Signed-off-by: Daniele Di Proietto --- lib/cmap.c| 2 +- tests/test-cmap.c | 31 +++

[ovs-dev] Delivery reports about your e-mail

2014-07-15 Thread The Post Office
The message was not delivered due to the following reason: Your message could not be delivered because the destination computer was unreachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely th

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

2014-07-15 Thread Alex Wang
> > @@ -685,12 +685,16 @@ stp_learn_in_state(enum stp_state state) >> } >> >> /* Returns true if 'state' is one in which rx&tx bpdu should be done on >> - * on a port, false otherwise. */ >> + * on a port, false otherwise. >> + * >> + * Returns true if 'state' is STP_DISABLED, since presumably in

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

2014-07-15 Thread Alex Wang
Thx Ben, will add a new column FWD_BPDU as suggested by Joe, Will add more comments to explain, On Tue, Jul 15, 2014 at 9:35 PM, Ben Pfaff wrote: > On Tue, Jul 15, 2014 at 07:19:53PM -0700, Alex Wang wrote: > > Commit 0d1cee123a84 (stp: Fix bpdu tx problem in listening state) > > makes ovs dro

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] stp: Make stp-disabled port forward stp bpdu packets.

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 07:19:53PM -0700, 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

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

2014-07-15 Thread Joe Stringer
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 flow setup, and copying the memory directly during flow dump, we are able to support up to 33% more flows in the datapath. Previous top-5 perf

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

2014-07-15 Thread Alex Wang
Hey Ben, Joe, Could I get a review of either or both of you, this evening? I'm planning to push it later tonight, Thanks, Alex Wang On Tue, Jul 15, 2014 at 7:19 PM, Alex Wang wrote: > Commit 0d1cee123a84 (stp: Fix bpdu tx problem in listening state) > makes ovs drop the stp bpdu packets if s

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

2014-07-15 Thread Alex Wang
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 stp bpdu packets will go through a level of resubmi

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 case the skb_alloc() fails. ___

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

[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 | 37 +++-- datapath

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

2014-07-15 Thread Joe Stringer
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 flow setup, and copying the memory directly during flow dump, we are able to support up to 33% more flows in the datapath. Previous top-5 perf

Re: [ovs-dev] [PATCH] Prepare ground for extensions to sFlow export

2014-07-15 Thread Neil McKee
Here is a link to a followup patch that exports the new sFlow structures. https://github.com/sflow/ovs/commit/e5a10227af2f9fc0a27bd52b40b616b22f3617ec (There is another "empty" commit showing up in between that represents the "git pull --rebase upstream master; git push" that I ran earlier today

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

2014-07-15 Thread Ben Pfaff
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 every dpif provider support 'operate'. The result

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

2014-07-15 Thread Andy Zhou
I sent V2 under a different subject due to the patch content change. Here is a link to the patch: http://patchwork.openvswitch.org/patch/4979/ On Mon, Jul 14, 2014 at 5:58 PM, Joe Stringer wrote: > On 15 July 2014 12:53, Jarno Rajahalme wrote: >> >> >> How about this: >> >> /* The caller must h

[ovs-dev] [PATCH] datapath: Refactor get_dp() function, add get_dp_rcu()

2014-07-15 Thread Andy Zhou
The added get_dp_rcu() requires its caller to hold rcu lock. get_dp() now requires caller to hold ovs lock. Sepearate APIs makes it clear on the intended use and the requirements of its caller. Signed-off-by: Andy Zhou --- datapath/datapath.c | 23 +-- 1 file changed, 17 ins

Re: [ovs-dev] [PATCH] tests: Use the 'LARGE_MSECS' variation of time/warp at more places.

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 08:24:08AM -0700, Gurucharan Shetty wrote: > commit 8661af798(timeval: Provide a variation for time/warp command) > provided a variation of time/warp command to prevent multiple > invocations of time/warp. That commit changed only the users in bfd.at > and cfm.at as they use

Re: [ovs-dev] [PATCH 2/2] debian: Automatically start openvswitch before first invocation of ovs-vsctl.

2014-07-15 Thread Ben Pfaff
On Mon, Jul 14, 2014 at 12:35:43PM -0700, Gurucharan Shetty wrote: > In the 'interfaces' file, if an admin adds the openvswitch interface > in 'auto', ifupdown will try to create OVS interfaces even before > openvswitch has started. In a case like that, assume that the admin > knows what he is doin

Re: [ovs-dev] [PATCH 1/2] debian: Option to create patch ports through 'interfaces'

2014-07-15 Thread Ben Pfaff
On Mon, Jul 14, 2014 at 12:35:42PM -0700, Gurucharan Shetty wrote: > This is a port of commit d7aab661 ( rhel: Add Patch Port support to > initscripts.) from rhel to debian's ifupdown script. > > Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff __

Re: [ovs-dev] [PATCH 4/4] lib/classifier: Clarify subtable skipping.

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 04:55:57AM -0700, Jarno Rajahalme wrote: > Clarify comments for trie-based subtable skipping. > > Perform the cheaper check first. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org

Re: [ovs-dev] [PATCH 3/4] lib/classifier: Return all matching prefix lengths from trie lookup.

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 04:55:56AM -0700, Jarno Rajahalme wrote: > Previously we only returned the last matching prefix length > encountered during a trie lookup, and skipped subtables that had > prefixes longer than that. This patch changes the trie lookup > functions to return all matching prefi

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

2014-07-15 Thread Andy Zhou
Good point on comments. I now agree it is necessary and should stay with the function. Comments aside, I am not happy with the nested rcu_read_lock(). It seems unnecessary. I will come up with a v2. On Mon, Jul 14, 2014 at 5:58 PM, Joe Stringer wrote: > On 15 July 2014 12:53, Jarno Rajahalme w

Re: [ovs-dev] [PATCH 1/4] lib/classifier: Unify struct classifier and cls_classifier.

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 04:55:54AM -0700, Jarno Rajahalme wrote: > Now that it is clear that struct cls_classifier itself does not > need RCU indirection and pvector is defined in its own header, it > is possible get rid of the indirection from struct classifier to > struct cls_classifier. > > Sug

Re: [ovs-dev] [PATCH 2/4] lib/classifier: Change a variable name.

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 04:55:55AM -0700, Jarno Rajahalme wrote: > This stylistic change makes the following patch a bit simpler. > > Signed-off-by: Jarno Rajahalme It's hard for me to see the difference between m_bits and n_bits in some of the fonts I use, and a 1-character difference isn't ide

Re: [ovs-dev] [PATCH 0/3][RFC] Implement a chroot for ovsdb-server

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 01:24:01PM +0200, Eric Sesterhenn wrote: > on my debian installation, the ovsdb-server is running as root. Since I > prefer to add additional mitigations for running services, I was looking > into putting the ovsdb-server into a chroot and implemented it in the > following t

Re: [ovs-dev] [PATCH] lib/coverage: Removed set but not used variables

2014-07-15 Thread Daniele Di Proietto
On Jul 15, 2014, at 12:42 PM, Ben Pfaff wrote: > On Tue, Jul 15, 2014 at 11:32:36AM -0700, Daniele Di Proietto wrote: >> This removes a GCC 4.9 warning (unused-but-set-variable) >> >> Signed-off-by: Daniele Di Proietto > > Applied to master, thanks. > > If this warning shows up on other branc

Re: [ovs-dev] [PATCH] lib/coverage: Removed set but not used variables

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 11:32:36AM -0700, Daniele Di Proietto wrote: > This removes a GCC 4.9 warning (unused-but-set-variable) > > Signed-off-by: Daniele Di Proietto Applied to master, thanks. If this warning shows up on other branches then I'm willing to apply it to them too.

[ovs-dev] [RFC v2] datapath/flow_netlink: Avoid wildcarding tunnel key with disabled megaflows

2014-07-15 Thread Daniele Di Proietto
If the userspace wants to match on a flow with some tunnel attributesset to 0, it simply omits them in the netlink attributes stream. Since our wildcarding logic (when megaflows are disabled) is based on the attributes in the netlink stream, we set our mask incorrectly. This commit adds a check to

[ovs-dev] [PATCH] lib/coverage: Removed set but not used variables

2014-07-15 Thread Daniele Di Proietto
This removes a GCC 4.9 warning (unused-but-set-variable) Signed-off-by: Daniele Di Proietto --- lib/coverage.c | 4 1 file changed, 4 deletions(-) diff --git a/lib/coverage.c b/lib/coverage.c index 5a20d6e..fe97d69 100644 --- a/lib/coverage.c +++ b/lib/coverage.c @@ -279,8 +279,6 @@ covera

Re: [ovs-dev] [RFC] datapath/flow_netlink: Avoid wildcarding tunnel key with disabled megaflows

2014-07-15 Thread Daniele Di Proietto
On Jul 11, 2014, at 4:11 PM, Andy Zhou wrote: > On Fri, Jul 11, 2014 at 3:05 PM, Daniele Di Proietto > wrote: >> If the userspace wants to match on a flow with tun_key.{tun_id, tun_flags, >> ipv4_tos} set to 0 it simply omits them in the netlink attributes stream. >> Since our wildcarding logic

Re: [ovs-dev] [PATCH v2] Extend OVS IPFIX exporter to export tunnel headers

2014-07-15 Thread Pravin Shelar
On Tue, Jul 15, 2014 at 1:23 AM, Wenyu Zhang wrote: > Hi Pravin, Thanks you for reviewing it. > > About the output tunnel info sent to userland, all the tunnel parameters in > ovs_key_ipv4_tunnel > have been sent to userland, except two parameters in geneve_opt, which is > only for GENEVE. >

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

2014-07-15 Thread Ben Pfaff
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 main reason for complication in the code was 'status_s

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

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:52:21PM +1200, Joe Stringer wrote: > 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 remain

Re: [ovs-dev] [PATCH 3/4] netlink-socket: Fix handling socket allocation failure in nl_dump_start().

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:18:19PM +1200, Joe Stringer wrote: > On 15 July 2014 09:10, Ben Pfaff wrote: > > > If nl_pool_alloc() failed, then 'dump' was not initialized at all and > > further use of the dump would access uninitialized data, probably causing > > a crash. > > > > Found by inspectio

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

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:13:05PM +1200, Joe Stringer wrote: > On 15 July 2014 09:10, Ben Pfaff wrote: > > > When dpif_linux_refresh_channels() refreshes the set of channels when > > the number of handlers changes, it destroys all the dpif's channels and > > sets dpif->uc_array_size to 0. If th

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

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:14:10PM +1200, Joe Stringer wrote: > On 15 July 2014 09:10, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > > > Acked-by: Joe Stringer Thanks. I pushed this to master. ___ dev mailing list dev@openvswitch.org http://o

Re: [ovs-dev] [PATCH] ofp-msgs: Correct code for queue configuration messages in OpenFlow 1.0.

2014-07-15 Thread Ben Pfaff
On Mon, Jul 14, 2014 at 10:37:38AM -0700, Ben Pfaff wrote: > Reported-by: Simon Jouet > Signed-off-by: Ben Pfaff I applied this to master because Simon confirmed off-list that it fixes the problem. ___ dev mailing list dev@openvswitch.org http://openvs

Re: [ovs-dev] [PATCH 14/14] Add sockaddr_nl back to netlink-protocol.h

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 01:08:48AM +, Alin Serdean wrote: > Add the structure sockaddr_nl to netlink-protocol.h for MSVC. Also remove > some warnings in netlink-socket.c when using MSVC. > > Signed-off-by: Alin Gabriel Serdean I think that nl_sock always uses 'fd' as a HANDLE on Windows and

Re: [ovs-dev] [PATCH 12/14] Add new headers to noinst_HEADERS

2014-07-15 Thread Ben Pfaff
On Fri, Jul 11, 2014 at 01:07:29AM +, Alin Serdean wrote: > Add the newly created headers in include/windows/* to > include/windows/automake.mk. > > Signed-off-by: Alin Gabriel Serdean This should be squashed with the patch that adds the headers, otherwise it breaks the build if you apply th

Re: [ovs-dev] [PATCH] Fix documentation error that led user to wrong file to install dependency packages.

2014-07-15 Thread Ben Pfaff
On Mon, Jul 14, 2014 at 11:32:52AM -0700, Kirkland Spector wrote: > Signed-off-by: Kirkland Spector > Acked-by: Andrey Falko Thanks! I applied this to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [clang 0/4] fix clang-analyzer reports (including one crash bug)

2014-07-15 Thread Ben Pfaff
Thanks a lot! I must have good karma lately, because all my patches are getting reviewed quickly. I pushed all of these to master, and backported the first patch (the crasher bug) to all relevant branches (branch-2.[321]). On Mon, Jul 14, 2014 at 04:47:29PM -0700, Jarno Rajahalme wrote: > For al

[ovs-dev] [PATCH] tests: Use the 'LARGE_MSECS' variation of time/warp at more places.

2014-07-15 Thread Gurucharan Shetty
commit 8661af798(timeval: Provide a variation for time/warp command) provided a variation of time/warp command to prevent multiple invocations of time/warp. That commit changed only the users in bfd.at and cfm.at as they used it the most. Since we haven't had any negative confequences because of th

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

2014-07-15 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:04:52PM +1200, Joe Stringer wrote: > The userspace datapath returns RCU-protected actions from flow_get() and > flow_dump_next(). This doesn't cause any trouble for current users of > these functions, but it imposes additional constraints on their use. > This patch makes