Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Alex Wang
Yeah, later, with a test, ~ On Fri, Jun 5, 2015 at 10:43 PM, Ben Pfaff wrote: > On Fri, Jun 05, 2015 at 10:36:55PM -0700, Alex Wang wrote: > > On Fri, Jun 5, 2015 at 10:00 PM, Ben Pfaff wrote: > > > > > This will still change the user's intent (and change the flows that the > > > user sets up),

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Ben Pfaff
On Fri, Jun 05, 2015 at 10:36:55PM -0700, Alex Wang wrote: > On Fri, Jun 5, 2015 at 10:00 PM, Ben Pfaff wrote: > > > This will still change the user's intent (and change the flows that the > > user sets up), breaking some of the forms described in meta-flow.h. > > > > This is closer to what I had

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Alex Wang
On Fri, Jun 5, 2015 at 10:00 PM, Ben Pfaff wrote: > This will still change the user's intent (and change the flows that the > user sets up), breaking some of the forms described in meta-flow.h. > > This is closer to what I had in mind: > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofpro

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Ben Pfaff
This will still change the user's intent (and change the flows that the user sets up), breaking some of the forms described in meta-flow.h. This is closer to what I had in mind: diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 71b8bef..41a03ef 100644 --- a/ofproto/of

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Alex Wang
How about this? diff --git a/lib/match.c b/lib/match.c index 7d0b409..e34572d 100644 --- a/lib/match.c +++ b/lib/match.c @@ -360,6 +360,10 @@ match_set_dl_tci(struct match *match, ovs_be16 tci) void match_set_dl_tci_masked(struct match *match, ovs_be16 tci, ovs_be16 mask) { +if (mask && mas

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Alex Wang
Thx for the reference, exactly what i want, Will change the solution~ Thanks, Alex Wang, On Fri, Jun 5, 2015 at 8:24 AM, Ben Pfaff wrote: > On Wed, Jun 03, 2015 at 11:21:50PM -0700, Alex Wang wrote: > > OVS datapath has check which prevents the installation of flow > > that matches VLAN TCI bu

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-05 Thread Ben Pfaff
On Wed, Jun 03, 2015 at 11:21:50PM -0700, Alex Wang wrote: > OVS datapath has check which prevents the installation of flow > that matches VLAN TCI but does not have exact match for VLAN_CFI > bit. However, the ovs userspace does not enforce it, so OpenFlow > flow like "vlan_tci=0x000a/0x0fff,acti

Re: [ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-03 Thread Alex Wang
I can reproduce the same issue Ronald report on master ovs. This patch will break the following tests on master: testsuite: 329 340 350 385 389 390 391 failed My understanding is that since we require the exact match for VLAN_CFI in kernel. We should also enforce it in userspace so that no Open

[ovs-dev] [RFC] vlan: Make sure vlan tci mask has exact match for VLAN_CFI.

2015-06-03 Thread Alex Wang
OVS datapath has check which prevents the installation of flow that matches VLAN TCI but does not have exact match for VLAN_CFI bit. However, the ovs userspace does not enforce it, so OpenFlow flow like "vlan_tci=0x000a/0x0fff,action=output:local" can be added to ovs. Subsequently, the generated