[ovs-dev] [PATCH/RFC 05/11] match: Add an implementation of match_set_mpls_lse()
Simon Horman
horms at verge.net.au
Wed Dec 25 06:43:48 UTC 2013
This is my interpretation of a
missing piece of "Alternate approach to MPLS"
Signed-off-by: Simon Horman <horms at verge.net.au>
---
lib/match.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/match.c b/lib/match.c
index 97216f3..c35f310 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -509,6 +509,15 @@ match_set_mpls_bos(struct match *match, int idx, uint8_t mpls_bos)
flow_set_mpls_bos(&match->flow, idx, mpls_bos);
}
+/* Modifies 'match' so that it matches only packets with an MPLS header whose
+ * LSE equals 'mpls_lse' */
+void
+match_set_mpls_lse(struct match *match, int idx, ovs_be32 mpls_lse)
+{
+ match->wc.masks.mpls_lse[idx] = OVS_BE32_MAX;
+ flow_set_mpls_lse(&match->flow, idx, mpls_lse);
+}
+
void
match_set_tp_src(struct match *match, ovs_be16 tp_src)
{
--
1.8.4
More information about the dev
mailing list