2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

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>
This commit is contained in:
Jesse Gross
2013-08-06 12:57:16 -07:00
parent ed2e724593
commit ac923e910e
13 changed files with 84 additions and 16 deletions

View File

@@ -139,12 +139,12 @@ static const struct mf_field mf_fields[MFF_N_IDS] = {
}, {
MFF_PKT_MARK, "pkt_mark", NULL,
MF_FIELD_SIZES(be32),
MFM_NONE,
MFM_FULLY,
MFS_HEXADECIMAL,
MFP_NONE,
false,
0, NULL,
0, NULL,
true,
NXM_NX_PKT_MARK, "NXM_NX_PKT_MARK",
NXM_NX_PKT_MARK, "NXM_NX_PKT_MARK",
},
#define REGISTER(IDX) \
@@ -1780,7 +1780,6 @@ mf_set(const struct mf_field *mf,
switch (mf->id) {
case MFF_IN_PORT:
case MFF_IN_PORT_OXM:
case MFF_PKT_MARK:
case MFF_SKB_PRIORITY:
case MFF_ETH_TYPE:
case MFF_DL_VLAN:
@@ -1829,6 +1828,11 @@ mf_set(const struct mf_field *mf,
ntohl(value->be32), ntohl(mask->be32));
break;
case MFF_PKT_MARK:
match_set_pkt_mark_masked(match, ntohl(value->be32),
ntohl(mask->be32));
break;
case MFF_ETH_DST:
match_set_dl_dst_masked(match, value->mac, mask->mac);
break;