]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack: add IPS_HW_OFFLOAD status bit
authorBodong Wang <bodong@mellanox.com>
Tue, 21 Apr 2020 15:04:16 +0000 (10:04 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 26 Apr 2020 21:54:35 +0000 (23:54 +0200)
commit34276e6feea8210caa0572d83b426a35ba560200
tree8d3af2496e79a7565f6ffac85df157c3e5c04179
parente7d8636bdf9917244b8e69a33e4f6c22ac0553b6
netfilter: nf_conntrack: add IPS_HW_OFFLOAD status bit

This bit indicates that the conntrack entry is offloaded to hardware
flow table. nf_conntrack entry will be tagged with [HW_OFFLOAD] if
it's offload to hardware.

cat /proc/net/nf_conntrack
ipv4 2 tcp 6 \
src=1.1.1.17 dst=1.1.1.16 sport=56394 dport=5001 \
src=1.1.1.16 dst=1.1.1.17 sport=5001 dport=56394 [HW_OFFLOAD] \
mark=0 zone=0 use=3

Note that HW_OFFLOAD/OFFLOAD/ASSURED are mutually exclusive.

Changelog:

* V1->V2:
- Remove check of lastused from stats. It was meant for cases such
  as removing driver module while traffic still running. Better to
  handle such cases from garbage collector.

Signed-off-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_conntrack_common.h
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nf_flow_table_offload.c