Commit 25da5eb3 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nft_meta: offload support for interface index

This patch adds support for offloading the NFT_META_IIF selector.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 90bc72b1
...@@ -45,6 +45,7 @@ struct nft_flow_key { ...@@ -45,6 +45,7 @@ struct nft_flow_key {
struct flow_dissector_key_ip ip; struct flow_dissector_key_ip ip;
struct flow_dissector_key_vlan vlan; struct flow_dissector_key_vlan vlan;
struct flow_dissector_key_eth_addrs eth_addrs; struct flow_dissector_key_eth_addrs eth_addrs;
struct flow_dissector_key_meta meta;
} __aligned(BITS_PER_LONG / 8); /* Ensure that we can do comparisons as longs. */ } __aligned(BITS_PER_LONG / 8); /* Ensure that we can do comparisons as longs. */
struct nft_flow_match { struct nft_flow_match {
......
...@@ -547,6 +547,10 @@ static int nft_meta_get_offload(struct nft_offload_ctx *ctx, ...@@ -547,6 +547,10 @@ static int nft_meta_get_offload(struct nft_offload_ctx *ctx,
sizeof(__u8), reg); sizeof(__u8), reg);
nft_offload_set_dependency(ctx, NFT_OFFLOAD_DEP_TRANSPORT); nft_offload_set_dependency(ctx, NFT_OFFLOAD_DEP_TRANSPORT);
break; break;
case NFT_META_IIF:
NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_META, meta,
ingress_ifindex, sizeof(__u32), reg);
break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment