mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
netfilter: nf_tables: add enum nft_flowtable_flags to uapi
Expose the NFT_FLOWTABLE_HW_OFFLOAD flag through uapi. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
8ac2bd3577
commit
cfbd1125fc
3 changed files with 12 additions and 2 deletions
|
@ -62,7 +62,7 @@ struct nf_flowtable_type {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum nf_flowtable_flags {
|
enum nf_flowtable_flags {
|
||||||
NF_FLOWTABLE_HW_OFFLOAD = 0x1,
|
NF_FLOWTABLE_HW_OFFLOAD = 0x1, /* NFT_FLOWTABLE_HW_OFFLOAD */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nf_flowtable {
|
struct nf_flowtable {
|
||||||
|
|
|
@ -1553,6 +1553,16 @@ enum nft_object_attributes {
|
||||||
};
|
};
|
||||||
#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
|
#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum nft_flowtable_flags - nf_tables flowtable flags
|
||||||
|
*
|
||||||
|
* @NFT_FLOWTABLE_HW_OFFLOAD: flowtable hardware offload is enabled
|
||||||
|
*/
|
||||||
|
enum nft_flowtable_flags {
|
||||||
|
NFT_FLOWTABLE_HW_OFFLOAD = 0x1,
|
||||||
|
NFT_FLOWTABLE_MASK = NFT_FLOWTABLE_HW_OFFLOAD
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum nft_flowtable_attributes - nf_tables flow table netlink attributes
|
* enum nft_flowtable_attributes - nf_tables flow table netlink attributes
|
||||||
*
|
*
|
||||||
|
|
|
@ -6375,7 +6375,7 @@ static int nf_tables_newflowtable(struct net *net, struct sock *nlsk,
|
||||||
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
||||||
flowtable->data.flags =
|
flowtable->data.flags =
|
||||||
ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS]));
|
ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS]));
|
||||||
if (flowtable->data.flags & ~NF_FLOWTABLE_HW_OFFLOAD)
|
if (flowtable->data.flags & ~NFT_FLOWTABLE_MASK)
|
||||||
goto err3;
|
goto err3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue