[ovs-dev] [PATCH v2.40 5/7] lib: Push MPLS tags in the OpenFlow 1.3 ordering

Ben Pfaff blp at nicira.com
Fri Sep 27 19:47:19 UTC 2013


On Fri, Sep 27, 2013 at 09:18:34AM +0900, Simon Horman wrote:
> From: Joe Stringer <joe at wand.net.nz>
> 
> This patch modifies the push_mpls behaviour to follow the OpenFlow 1.3
> specification in the presence of VLAN tagged packets. From the spec:
> 
> "Newly pushed tags should always be inserted as the outermost tag in the
> outermost valid location for that tag. When a new VLAN tag is pushed, it
> should be the outermost tag inserted, immediately after the Ethernet
> header and before other tags. Likewise, when a new MPLS tag is pushed,
> it should be the outermost tag inserted, immediately after the Ethernet
> header and before other tags."
> 
> When the push_mpls action was inserted using OpenFlow 1.2, we implement
> the previous behaviour by inserting VLAN actions around the MPLS action
> in the odp translation; Pop VLAN tags before committing MPLS actions,
> and push the expected VLAN tag afterwards. The trigger condition for
> this is based on the ofpact->compat field.
> 
> Signed-off-by: Joe Stringer <joe at wand.net.nz>
> Signed-off-by: Simon Horman <horms at verge.net.au>

Referring to the OF1.2 behavior as "compat behavior" makes the
difference between the two possibilities less clear than otherwise.  I
would prefer to use terminology that makes the distinction obvious.
Perhaps "push mpls before vlan" or "push mpls after vlan" or something
along those lines?

Thanks,

Ben.



More information about the dev mailing list