[ovs-dev] [PATCH 09/18] User-Space MPLS actions and matches

Simon Horman horms at verge.net.au
Thu Dec 27 22:59:07 UTC 2012


On Thu, Dec 27, 2012 at 03:22:03PM +0200, Jarno Rajahalme wrote:
> On Dec 27, 2012, at 7:23 , ext Simon Horman wrote:
> > diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> > index e79cc72..41f8a53 100644
> > --- a/lib/ofp-util.c
> > +++ b/lib/ofp-util.c
> > @@ -1152,6 +1151,24 @@ ofputil_usable_protocols(const struct match *match)
> >             | OFPUTIL_P_OF13_OXM;
> >     }
> > 
> > +    /* NXM and OF1.3+ support matching MPLS label */
> > +    /* Allow for OF1.2 as there doesn't seem to be a
> > +     * particularly good reason not to and negotiation
> > +     * of an OF1.3 session is not yet supported. */
> > +    if (wc->masks.mpls_lse & htonl(MPLS_LABEL_MASK)) {
> > +        return OFPUTIL_P_OF10_NXM_ANY | OFPUTIL_P_OF12_OXM;
> > +    }
> > +
> > +    /* NXM and OF1.1+ support matching MPLS TC */
> > +    if (wc->masks.mpls_lse & htonl(MPLS_TC_MASK)) {
> > +        return OFPUTIL_P_OF10_NXM_ANY | OFPUTIL_P_OF12_OXM;
> > +    }
> > +
> > +    /* NXM and OF1.1+ support matching MPLS stack flag */
> > +    if (wc->masks.mpls_lse & htonl(MPLS_BOS_MASK)) {
> > +        return OFPUTIL_P_OF10_NXM_ANY | OFPUTIL_P_OF12_OXM;
> > +    }
> > +
> >     /* Other formats can express this rule. */
> >     return OFPUTIL_P_ANY;
> > }
> 
> 
> These should add " | OFPUTIL_P_OF13_OXM", as OF1.3 session is now supported.
> The preceding comment need a corresponding correction.

Thanks, will do.

This patch has been around longer than OFPUTIL_P_OF13_OXM, thanks
for spotting the required update.



More information about the dev mailing list