[ovs-dev] [PATCH] datapath: Use masked flow when validating actions.

2013-07-15 Thread Jesse Gross
It is important to validate flow actions to ensure that they do not try to write off the end of a packet. The mechanism to do this is to ensure that a flow is precise enough to describe valid vs. invalid packets and only allowing actions on valid flows. The introduction of megaflows broke this by

[ovs-dev] band types

2013-07-15 Thread YAMAMOTO Takashi
hi, it seems that openflow implementations disagree about OFPMBT_ and encoding of ofp_meter_features.band_types. (see below) can anyone clarify which is spec-wise correct? i peeked the spec but it was unclear to me. i'm afraid that other feature bitmaps have similar problems. YAMAMOTO Takashi

Re: [ovs-dev] [PATCH] datapath: Revert "datapath: rhel: Account for RHEL specific backports"

2013-07-15 Thread Pravin Shelar
On Mon, Jul 15, 2013 at 12:54 PM, Jesse Gross wrote: > On Mon, Jul 15, 2013 at 12:45 PM, Pravin B Shelar wrote: >> This reverts commit 752378e1cd1f133a8366fbacec3b281a45ff8268 >> (datapath: rhel: Account for RHEL specific backports). >> Change related to netif_needs_gso() is cuasing panic on RHEL

Re: [ovs-dev] [PATCH v2] datapath: Use RCU lock for dp dump operation.

2013-07-15 Thread Pravin Shelar
On Mon, Jul 15, 2013 at 3:59 PM, Jesse Gross wrote: > On Mon, Jul 15, 2013 at 12:58 PM, Pravin B Shelar wrote: >> RCUfy dp-dump operation which is already read-only. This >> makes all ovs dump operations lockless. >> >> Signed-off-by: Pravin B Shelar > > Acked-by: Jesse Gross Thanks, I pushed

Re: [ovs-dev] Datapath action verification (was: [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.)

2013-07-15 Thread Jesse Gross
On Mon, Jul 15, 2013 at 6:00 PM, Justin Pettit wrote: > > On Jul 15, 2013, at 2:14 PM, Jesse Gross wrote: > >> On Mon, Jul 15, 2013 at 11:06 AM, Ben Pfaff wrote: >>>* I am not sure that set_arp() is called in a context where there is >>> guaranteed to be a full Ethernet+IP ARP header pr

Re: [ovs-dev] [PATCH] BFD: Add check_tnl_key feature to BFD code.

2013-07-15 Thread Ethan Jackson
Merged, thanks! Ethan On Mon, Jul 15, 2013 at 6:58 PM, Pavithra Ramesh wrote: > This change adds the check_tnl_key functionality for BFD. > When the feature is enabled, BFD will only accept control > packets with a tunnel key of 0. > > Signed-off-by: Pavithra Ramesh > --- > lib/bfd.c

Re: [ovs-dev] [PATCH] ofproto-dpif: Don't put new subfacets as result of "userspace" action.

2013-07-15 Thread Justin Pettit
I think you mean subfacet that isn't installed. I don't know that the first approach is technically wrong, but I agree your solution is cleaner. I respun the patch and sent it out as a v2. Thanks! --Justin On Jul 12, 2013, at 6:14 PM, Ethan Jackson wrote: > This makes me a bit uncomfortab

[ovs-dev] [PATCHv2] ofproto-dpif: Don't put new subfacets as result of "userspace" action.

2013-07-15 Thread Justin Pettit
Don't install a flow if it's the result of the "userspace" action for an already installed facet. This can occur when a datapath flow with wildcards has a "userspace" action and flows sent to userspace result in a different subfacet, which will then be rejected as overlapping by the datapath. Sig

[ovs-dev] [PATCH] BFD: Add check_tnl_key feature to BFD code.

2013-07-15 Thread Pavithra Ramesh
This change adds the check_tnl_key functionality for BFD. When the feature is enabled, BFD will only accept control packets with a tunnel key of 0. Signed-off-by: Pavithra Ramesh --- lib/bfd.c| 16 ++-- lib/bfd.h|4 +++- ofproto/ofproto-d

Re: [ovs-dev] Datapath action verification (was: [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.)

2013-07-15 Thread Justin Pettit
On Jul 15, 2013, at 2:14 PM, Jesse Gross wrote: > On Mon, Jul 15, 2013 at 11:06 AM, Ben Pfaff wrote: >>* I am not sure that set_arp() is called in a context where there is >> guaranteed to be a full Ethernet+IP ARP header present in the packet, >> given megaflows. > > This is a l

Re: [ovs-dev] [PATCH] BFD: Add small features to existing BFD code.

2013-07-15 Thread Ethan Jackson
This looks pretty much on the right track, just minor comments. I think setting the tos bits is sufficiently unrelated, that it belongs in it's own patch. Would you mind separating it out? Please add a short description of the check_tnl_key configuration option to the bfd section of vswitch.xml w

[ovs-dev] [PATCH] ovs-ofctl: Bug fix in flow_format()

2013-07-15 Thread Andy Zhou
Fix a corner case bug where ARP packet with ARP opcode value of 1 would cause tp_src and tp_dst to appear in the output string. This bug caused some output from 'ovs-appctl -t ovs-l3d l3d/recorder show' not be accepted by 'ovs-appctl ofproto/trace' Added test coverage by using ARP opcode 1 in one

Re: [ovs-dev] [PATCH] Fix hindex iteration incomplete bug

2013-07-15 Thread Ben Pfaff
On Mon, Jul 15, 2013 at 08:21:04AM +0800, ZhengLingyun wrote: > hindex_next() shouldn't jump over different hashs in the same bucket. > tests/test-hindex did not detect it, add a multipart_hash() method to detect > it. > > > Signed-off-by: ZhengLingyun Thank you very much for finding the probl

Re: [ovs-dev] [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.

2013-07-15 Thread Ben Pfaff
On Mon, Jul 15, 2013 at 01:40:35PM -0700, Jesse Gross wrote: > On Mon, Jul 15, 2013 at 11:06 AM, Ben Pfaff wrote: > > This follows the pattern I see elsewhere for other "set" actions, but I am > > uncertain about some parts: > > > > * I am not sure that set_arp() is called in a context where t

Re: [ovs-dev] [PATCH v2] datapath: Use RCU lock for dp dump operation.

2013-07-15 Thread Jesse Gross
On Mon, Jul 15, 2013 at 12:58 PM, Pravin B Shelar wrote: > RCUfy dp-dump operation which is already read-only. This > makes all ovs dump operations lockless. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross X-CudaMail-Whitelist-To: dev@openvswitch.org ___

Re: [ovs-dev] [PATCH] tests: Fix theoretical races in "ofproto-dpif - controller" test.

2013-07-15 Thread Gurucharan Shetty
On Fri, Jul 12, 2013 at 9:39 AM, Ben Pfaff wrote: > I don't see anything that guaranteed that ovs-ofctl would receive and print > the packets before it exited. This commit inserts explicit waits, to avoid > the problem. > > Found by inspection. > > Signed-off-by: Ben Pfaff > Looks good to me.

[ovs-dev] [PATCH V3 1/2] bfd: Implement BFD decay.

2013-07-15 Thread Alex Wang
When there is no incoming data traffic at the interface for a period, BFD decay allows the bfd session to increase the min_rx. This is helpful in that some interfaces usually idle for long time. And cpu consumption can be reduced by processing fewer bfd control packets. Signed-off-by: Alex Wang -

[ovs-dev] Datapath action verification (was: [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.)

2013-07-15 Thread Jesse Gross
On Mon, Jul 15, 2013 at 11:06 AM, Ben Pfaff wrote: > * I am not sure that set_arp() is called in a context where there is > guaranteed to be a full Ethernet+IP ARP header present in the packet, > given megaflows. This is a larger problem with all actions that I had mentioned befor

Re: [ovs-dev] [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.

2013-07-15 Thread Jesse Gross
On Mon, Jul 15, 2013 at 11:06 AM, Ben Pfaff wrote: > This follows the pattern I see elsewhere for other "set" actions, but I am > uncertain about some parts: > > * I am not sure that set_arp() is called in a context where there is > guaranteed to be a full Ethernet+IP ARP header present

Re: [ovs-dev] [threads v2 07/13] system-stats: Move into separate thread.

2013-07-15 Thread Gurucharan Shetty
On Mon, Jul 15, 2013 at 12:43 PM, Ben Pfaff wrote: > On Fri, Jul 12, 2013 at 04:46:33PM -0700, Gurucharan Shetty wrote: > > On Fri, Jul 12, 2013 at 2:54 PM, Ben Pfaff wrote: > > > > > Signed-off-by: Ben Pfaff > > > --- > > > vswitchd/system-stats.c | 105 > > >

[ovs-dev] [PATCH v2] datapath: Use RCU lock for dp dump operation.

2013-07-15 Thread Pravin B Shelar
RCUfy dp-dump operation which is already read-only. This makes all ovs dump operations lockless. Signed-off-by: Pravin B Shelar --- v1-v2: Make dp list RCU-safe. --- datapath/datapath.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/datapath/datapath.c b/dat

Re: [ovs-dev] [PATCH] datapath: Revert "datapath: rhel: Account for RHEL specific backports"

2013-07-15 Thread Jesse Gross
On Mon, Jul 15, 2013 at 12:45 PM, Pravin B Shelar wrote: > This reverts commit 752378e1cd1f133a8366fbacec3b281a45ff8268 > (datapath: rhel: Account for RHEL specific backports). > Change related to netif_needs_gso() is cuasing panic on RHEL > and Xen platforms. This way we revert back to use of ov

[ovs-dev] [PATCH] datapath: Revert "datapath: rhel: Account for RHEL specific backports"

2013-07-15 Thread Pravin B Shelar
This reverts commit 752378e1cd1f133a8366fbacec3b281a45ff8268 (datapath: rhel: Account for RHEL specific backports). Change related to netif_needs_gso() is cuasing panic on RHEL and Xen platforms. This way we revert back to use of ovs skb_gso_segment() and netif_skb_features() which has required c

Re: [ovs-dev] [threads v2 07/13] system-stats: Move into separate thread.

2013-07-15 Thread Ben Pfaff
On Fri, Jul 12, 2013 at 04:46:33PM -0700, Gurucharan Shetty wrote: > On Fri, Jul 12, 2013 at 2:54 PM, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > --- > > vswitchd/system-stats.c | 105 > > +- > > 1 files changed, 84 insertions(+), 21 deletion

Re: [ovs-dev] [threads v2 06/13] latch: New module for a thread-safe, signal-safe, pollable doorbell.

2013-07-15 Thread Ben Pfaff
On Mon, Jul 15, 2013 at 09:24:44AM -0400, Ed Maste wrote: > On 12 July 2013 17:54, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > > > Acked-by: Ed Maste Thanks, I applied this to master. I added some comments, since I"d forgotten to do that earlier. > with one comment, > > diff --git

Re: [ovs-dev] [threads v2 01/13] stress: Remove essentially unused library.

2013-07-15 Thread Ben Pfaff
On Fri, Jul 12, 2013 at 05:16:03PM -0700, Gurucharan Shetty wrote: > On Fri, Jul 12, 2013 at 2:54 PM, Ben Pfaff wrote: > > > The "stress" library was introduced years ago. We intended at the time to > > start using it to provoke errors in testing, to make sure that Open vSwitch > > was resilient

[ovs-dev] [PATCH 2/2] [RFC] datapath: Make arp headers modifiable.

2013-07-15 Thread Ben Pfaff
This follows the pattern I see elsewhere for other "set" actions, but I am uncertain about some parts: * I am not sure that set_arp() is called in a context where there is guaranteed to be a full Ethernet+IP ARP header present in the packet, given megaflows. * set_arp() as wri

[ovs-dev] [PATCH 1/2] Make ARP fields modifiable in userspace datapath.

2013-07-15 Thread Ben Pfaff
Signed-off-by: Ben Pfaff CC: Pankaj Thakkar CC: Teemu Koponen --- lib/meta-flow.c | 10 +- lib/odp-execute.c | 17 - lib/odp-util.c| 49 ++--- tests/ofproto-dpif.at | 31 +++

[ovs-dev] [PATCH] BFD: Add small features to existing BFD code.

2013-07-15 Thread Pavithra Ramesh
This change adds the check_tnl_key functionality for BFD. It also populates the ToS field for BFD packets. Signed-off-by: Pavithra Ramesh --- lib/bfd.c| 19 --- lib/bfd.h|4 +++- ofproto/ofproto-dpif-xlate.c |2 +- 3 files changed

Re: [ovs-dev] [PATCH] rhel, xenserver: Create /var/log/openvswitch directory.

2013-07-15 Thread Ben Pfaff
On Mon, Jul 15, 2013 at 08:52:26AM -0700, Gurucharan Shetty wrote: > On Sat, Jul 13, 2013 at 10:53 AM, Ben Pfaff wrote: > > > That's even better then, thank you! > > > Okay. I sent a V2 with that change. I tested it on xenserver and rhel, but > not on Fedora. It should be fine on Fedora too, thou

Re: [ovs-dev] [PATCH v2] rhel, xenserver: Create /var/log/openvswitch directory.

2013-07-15 Thread Ben Pfaff
On Mon, Jul 15, 2013 at 08:25:21AM -0700, Gurucharan Shetty wrote: > During installation create the /var/log/openvswitch directory > so that openvswitch startup script is able to write the ovs-ctl.log > > Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff _

Re: [ovs-dev] [PATCH] rhel, xenserver: Create /var/log/openvswitch directory.

2013-07-15 Thread Gurucharan Shetty
On Sat, Jul 13, 2013 at 10:53 AM, Ben Pfaff wrote: > That's even better then, thank you! > Okay. I sent a V2 with that change. I tested it on xenserver and rhel, but not on Fedora. It should be fine on Fedora too, though. > On Jul 13, 2013 9:32 AM, "Gurucharan Shetty" wrote: > >> On Fri, Jul 12

[ovs-dev] [PATCH v2] rhel, xenserver: Create /var/log/openvswitch directory.

2013-07-15 Thread Gurucharan Shetty
During installation create the /var/log/openvswitch directory so that openvswitch startup script is able to write the ovs-ctl.log Signed-off-by: Gurucharan Shetty --- rhel/openvswitch-fedora.spec.in |1 + rhel/openvswitch.spec.in |1 + xenserver/openvswitch-xen.spec.in |1

Re: [ovs-dev] [threads v2 06/13] latch: New module for a thread-safe, signal-safe, pollable doorbell.

2013-07-15 Thread Ed Maste
On 12 July 2013 17:54, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > Acked-by: Ed Maste with one comment, diff --git a/lib/latch.c b/lib/latch.c > +void > +(latch_wait)(const struct latch *latch, const char *where) > ... > diff --git a/lib/latch.h b/lib/latch.h > +#define latch_wait(latch)