History

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.

Bodong Wang committed 6 years ago

Commit 74f99481 parent 3fd8dc23 files · +12 −3Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_conntrack_common.h+6−2
@@ -114,15 +114,19 @@ enum ip_conntrack_status { · 113 unmodified lines
114114 IPS_OFFLOAD_BIT = 14,
115115 IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT),
116116
117+ /* Conntrack has been offloaded to hardware. */
118+ IPS_HW_OFFLOAD_BIT = 15,
119+ IPS_HW_OFFLOAD = (1 << IPS_HW_OFFLOAD_BIT),
120+
117121 /* Be careful here, modifying these bits can make things messy,
118122 * so don't let users modify them directly.
119123 */
120124 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |
121125 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
122126 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED |
123− IPS_OFFLOAD),
127+ IPS_OFFLOAD | IPS_HW_OFFLOAD),
124128
125− __IPS_MAX_BIT = 15,
129+ __IPS_MAX_BIT = 16,
126130 };
127131
128132 /* Connection tracking event types */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t