On Fri, Oct 04, 2013 at 05:09:57PM +0900, Simon Horman wrote:
> From: Joe Stringer <[email protected]>
>
> This patch adds new ofpact_from_openflow13() and
> ofpacts_from_openflow13() functions parallel to the existing ofpact
> handling code. In the OpenFlow 1.3 version, push_mpls is handled
> differently, but all other actions are handled by the existing code.
>
> In the case of push_mpls for OpenFlow 1.3 the new mpls_before_vlan field of
> struct ofpact_push_mpls is set to true. This will be used by a subsequent
> patch to allow allow the correct VLAN+MPLS datapath behaviour to be
> determined at odp translation time.
>
> Signed-off-by: Joe Stringer <[email protected]>
> Signed-off-by: Simon Horman <[email protected]>
The need for a huge comment on mpls_before_vlan suggests to me that
breaking it out as a separate type would be helpful. How about this:
/* The position in the packet at which to insert an MPLS header.
*
* Used NXAST_PUSH_MPLS, OFPAT11_PUSH_MPLS. */
enum ofpact_mpls_position {
/* Add the MPLS LSE after the Ethernet header but before any VLAN tags.
* OpenFlow 1.3+ requires this behavior. */
OFPACT_MPLS_BEFORE_VLAN,
/* Add the MPLS LSE after the Ethernet header and any VLAN tags.
* OpenFlow 1.1 and 1.2 require this behavior. */
OFPACT_MPLS_AFTER_VLAN
};
/* OFPACT_PUSH_VLAN/MPLS/PBB
*
* Used for NXAST_PUSH_MPLS, OFPAT11_PUSH_MPLS. */
struct ofpact_push_mpls {
struct ofpact ofpact;
ovs_be16 ethertype;
enum ofpact_mpls_position position;
};
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev