[ovs-dev] [PATCH v11 5/6] Always update ethertype on mpls_pop

Simon Horman horms at verge.net.au
Wed Jun 5 04:58:22 UTC 2013


On Wed, May 29, 2013 at 06:18:07AM +0000, Nagendra Kumar (naikumar) wrote:
> Simon,
> 
> I think 8848 is not for MPLS multicast. With RFC5332, 8848 is to be used when top label is upstream assigned label.
> 
> -Nagendra

Thanks, I wasn't aware of that.

It seems that the usage of 8848 as MPLS multicast in the patchset was
correct prior to 5332.

As the Open vSwtich implementation and IIRC the OpenFlow spec does
not define any policy relating to the use of 8847 or 8848 I suspect that
it is not necessary to update my patches or otherwise enhance
the logic of Open vSwtich in order to take into account RFC5332.

To be clear, I don't think that there is anything in this patchset
to prevent configuration compliance with RFC5332. However it is also
possible to configure the system in such a way that it does not
follow RFC5332.

> 
> -----Original Message-----
> From: dev-bounces at openvswitch.org [mailto:dev-bounces at openvswitch.org] On Behalf Of Simon Horman
> Sent: Wednesday, May 29, 2013 11:37 AM
> To: dev at openvswitch.org
> Cc: Simon Horman
> Subject: [ovs-dev] [PATCH v11 5/6] Always update ethertype on mpls_pop
> 
> The ethertype should always be updated on mpls_pop as there may be a transition between MPLS unicast (0x8847) and MPLS multicast (0x8848).
> 
> Ben Pfaff tells me that this is consistent with the behaviour described in EXT-194 of the JIRA bug tracker.
> 
> Signed-off-by: Simon Horman <horms+renesas at verge.net.au>
> 
> ---
> 
> v11
> * Include in recirculation patch-set
> 
> v3 - v10
> * Not posted
> 
> v2
> * Add note about EXT-194 to changelog
> * Update manpage. Note that I plan to post a patch to
>   make use of recirculation to remove restrictions on
>   the use of MPLS pop and push.
> ---
>  lib/packets.c            |    3 +--
>  utilities/ovs-ofctl.8.in |    7 ++++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/packets.c b/lib/packets.c index 77aa7d3..f2e0f81 100644
> --- a/lib/packets.c
> +++ b/lib/packets.c
> @@ -373,9 +373,8 @@ pop_mpls(struct ofpbuf *packet, ovs_be16 ethtype)
>          size_t len;
>          mh = packet->l2_5;
>          len = (char*)packet->l2_5 - (char*)packet->l2;
> -        /* If bottom of the stack set ethertype. */
> +        set_ethertype(packet, ethtype);
>          if (mh->mpls_lse & htonl(MPLS_BOS_MASK)) {
> -            set_ethertype(packet, ethtype);
>              packet->l2_5 = NULL;
>          } else {
>              packet->l2_5 = (char*)packet->l2_5 + MPLS_HLEN; diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index 061982b..e66c605 100644
> --- a/utilities/ovs-ofctl.8.in
> +++ b/utilities/ovs-ofctl.8.in
> @@ -944,9 +944,10 @@ followed by another \fBpush_mpls\fR will result in the first  \fBpush_mpls\fR being discarded.
>  .
>  .IP \fBpop_mpls\fR:\fIethertype\fR
> -Strips the outermost MPLS label stack entry.  If the MPLS label -stripped was the only one, changes the ethertype of a packet to -\fIethertype\fR, which should not ordinarily be an MPLS Ethertype.
> +Strips the outermost MPLS label stack entry.
> +Currently the implementation restricts \fIethertype\fR to a non-MPLS 
> +Ethertype and thus \fBpop_mpls\fR should only be applied to packets 
> +with an MPLS label stack depth of one.
>  .
>  .IP
>  There are some limitations in the implementation.  \fBpop_mpls\fR
> --
> 1.7.10.4
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
> 



More information about the dev mailing list