[ovs-dev] [PATCH 5/5] [RFC] ofp-actions: Check pre-requisists of set-field actions

Simon Horman horms at verge.net.au
Thu Sep 20 04:13:41 UTC 2012


On Thu, Sep 13, 2012 at 12:01:44PM +0900, Simon Horman wrote:
> On Wed, Sep 12, 2012 at 12:09:41PM -0700, Ben Pfaff wrote:
> > On Wed, Sep 12, 2012 at 05:44:32PM +0900, Simon Horman wrote:
> > > By passing a flow to the action parser the pre-requisites
> > > of set-feild actions will be checked. If the flow is NULL,
> > > for instance in test code such as ofctl_parse_ofp11_instructions(),
> > > then the check is skiped, as it always was before this change.
> > > 
> > > Unfortunately I don't think that this check is correct as
> > > it does not take into account other actions actions that may
> > > be applied before the load action, e.g. vlan push/pop, which may
> > > affect the pre-requisites.
> > > 
> > > I believe that in its current form there is scope for both false positives
> > > (not so bad, perhaps) and false negatives (pretty bad). I would welcome
> > > some input on if these concerns are valid and if so how they may be
> > > overcome.
> > 
> > When I've thought about this problem before, I wasn't able to come up
> > with an example of when the prerequisite check would be wrong.  Do you
> > have an example?
> 
> I would very much like for this not to be a problem.
> But here are examples that I am concerned about.

Hi Ben,

do you have any thoughts on this?

> # MPLS false negative
> 
> 1. Packet with no MPLS header arrives
> 2. Push MPLS action is applied
> 3. Set-Field:MPLS_LABEL action is applied
> 
> The pre-requisite for 3 is Eth Type 0x8847 or 0x8848,
> but that isn't true until 2 is applied.
> 
> 
> # MPLS false positive
> 
> 1. Packet with single MPLS header arrives
> 2. Pop MPLS action is applied
> 3. Set-Field:MPLS_LABEL action is applied
> 
> The pre-requisite for 3 is Eth Type 0x8847 or 0x8848,
> which is true at 1 but not after 2 is applied.
> 
> 
> # VLAN false positive
> 
> 1. Ppacket without VLAN header arrives
> 2. Push VLAN action is applied
> 3. Set-Field:VLAN_PCP is applied
> 
> The pre-requisite for 3 is that VLAN_VID!=NONE,
> but this isn't true until 2 is applied.
> 
> 
> # VLAN false negative
> 
> 1. Packet with single VLAN header arrives
> 2. Pop VLAN action is applied
> 3. Set-Field:VLAN_PCP is applied
> 
> The pre-requisite for 3 is that VLAN_VID!=NONE,
> which is true at 1, but not after 2 is applied.
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
> 



More information about the dev mailing list