]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: support for offload chain flag
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2020 12:14:59 +0000 (13:14 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2020 13:16:51 +0000 (14:16 +0100)
commitd42bd56cff1a22301703d2b9d6d6fc937ea7cfbd
tree4bba0412324834f49303f0cf237991232daa033c
parent8ab720e343af35366f02dc0b9bac102eeedcdbad
src: support for offload chain flag

This patch extends the basechain definition to allow users to specify
the offload flag. This flag enables hardware offload if your drivers
supports it.

 # cat file.nft
 table netdev x {
    chain y {
       type filter hook ingress device eth0 priority 10; flags offload;
    }
 }
 # nft -f file.nft

Note: You have to enable offload via ethtool:

 # ethtool -K eth0 hw-tc-offload on

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/mnl.c
src/netlink.c
src/parser_bison.y
src/rule.c