match: Correct formatting of MPLS
authorSimon Horman <horms@verge.net.au>
Wed, 24 Apr 2013 09:02:35 +0000 (18:02 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 24 Apr 2013 17:19:27 +0000 (10:19 -0700)
commit392c30bac2f017d65768e8b0f89bdf54aa196bf4
tree0f495b62ed460382d4c0d9d91d6f7267463e1791
parent1ab9712b8936d175457121a4812a087ba9fa87fb
match: Correct formatting of MPLS

1. mpls or mplsm should be included in the formatted match  instead of
   dl_type=0xXXXX if the dl_type of the match is ETH_TYPE_MPLS or
   ETH_TYPE_MPLS_MCAST respectively. This is consistent with the treatment
   of other dl_types in match_format().

2. Add formatting of MPLS TTL to match_format().
   The format is mpls_ttl=YY.

3. Set the mpls_lse mask of a match to all 1's if
   the dl_type of the flow is ETH_TYPE_MPLS or ETH_TYPE_MPLS_MCAST.
   This will cause mpls_label=LLLL,mpls_tc=W,mpls_ttl=YY,mpls_bos=Z to
   be included with the match is formatted.

4. mpls(label:LLLL,tc:W,ttl:TT,bos:Z) and
   mplsm(label:LLLL,tc:W,ttl:TT,bos:Z) should not be included
   in a formatted match as this is not consistent with the
   formatting of other match elements.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/match.c
tests/ofproto-dpif.at