summaryrefslogtreecommitdiff
path: root/lib/nx-match.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2013-08-06 12:57:16 -0700
committerJesse Gross <jesse@nicira.com>2013-08-13 14:39:56 -0700
commitac923e910e15e934137b9f12997d153c83292edf (patch)
tree79ac3ed611799a2a6ea9f2d251a2c767a93d8021 /lib/nx-match.c
parented2e72459317c689c46d3f1d279945485ff34fda (diff)
downloadopenvswitch-ac923e910e15e934137b9f12997d153c83292edf.tar.gz
flow: Enable matching on new field 'pkt_mark'.
The Linux kernel datapath enables matching and setting the skb mark but this functionality is currently used only internally by ovs-vswitchd. This exposes it through NXM to enable external controllers to interact with other kernel subsystems. Although this is simply exporting the skb mark, the intention is that this is a platform independent mechanism to access some system metadata and therefore may have different implementations on various systems. Bug #17855 Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
Diffstat (limited to 'lib/nx-match.c')
-rw-r--r--lib/nx-match.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c
index 940dd9a44..09f7f548b 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -693,6 +693,10 @@ nx_put_raw(struct ofpbuf *b, bool oxm, const struct match *match,
htonl(flow->regs[i]), htonl(match->wc.masks.regs[i]));
}
+ /* Mark. */
+ nxm_put_32m(b, NXM_NX_PKT_MARK, htonl(flow->pkt_mark),
+ htonl(match->wc.masks.pkt_mark));
+
/* OpenFlow 1.1+ Metadata. */
nxm_put_64m(b, OXM_OF_METADATA, flow->metadata, match->wc.masks.metadata);