[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131007062544.GE19926@verge.net.au>
Date: Mon, 7 Oct 2013 15:25:47 +0900
From: Simon Horman <horms@...ge.net.au>
To: Ben Pfaff <blp@...ira.com>
Cc: dev@...nvswitch.org, netdev@...r.kernel.org,
Jesse Gross <jesse@...ira.com>,
Pravin B Shelar <pshelar@...ira.com>,
Ravi K <rkerur@...il.com>,
Isaku Yamahata <yamahata@...inux.co.jp>,
Joe Stringer <joe@...d.net.nz>
Subject: Re: [PATCH v2.42 2/5] ofp-actions: Add separate OpenFlow 1.3 action
parser
On Fri, Oct 04, 2013 at 09:31:05AM -0700, Ben Pfaff wrote:
> On Fri, Oct 04, 2013 at 05:09:57PM +0900, Simon Horman wrote:
> > From: Joe Stringer <joe@...d.net.nz>
> >
> > 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 <joe@...d.net.nz>
> > Signed-off-by: Simon Horman <horms@...ge.net.au>
>
> 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;
> };
Hi Ben,
thanks, that looks very nice.
I will incorporate it in the next revision of the patchset.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists