remove offload_pickup sysctl again
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-bluefield (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Bodong Wang |
Bug Description
* Explain the feature
These two sysctls were added because the hardcoded defaults (2 minutes, tcp, 30 seconds, udp) turned out to be too low for some setups.
They appeared in 5.14-rc1 so it should be fine to remove it again.
Note: they patch was introduced before the Linux kernel was released.
Marcelo convinced me that there should be no difference between a flow that was offloaded vs. a flow that was not wrt. timeout handling.
Thus the default is changed to those for TCP established and UDP stream,
5 days and 120 seconds, respectively.
Marcelo also suggested to account for the timeout value used for the offloading, this avoids increase beyond the value in the conntrack-sysctl and will also instantly expire the conntrack entry with altered sysctls.
Example:
nf_conntrack
nf_flowtable
This will remove offloaded udp flows after one minute, rather than two.
An earlier version of this patch also cleared the ASSURED bit to allow nf_conntrack to evict the entry via early_drop (i.e., table full).
However, it looks like we can safely assume that connection timed out via HW is still in established state, so this isn't needed.
Quoting Oz:
[..] the hardware sends all packets with a set FIN flags to sw.
[..] Connections that are aged in hardware are expected to be in the established state.
In case it turns out that back-to-sw-path transition can occur for 'dodgy' connections too (e.g., one side disappeared while software-path would have been in RETRANS timeout), we can adjust this later.
* How to test
Create OVS bridge with 2 devices mlx5 rep devices.
Enable HW offload and configure regular connection tracking OpenFlow rules:
e.g:
ovs-ofctl del-flows br-ovs
ovs-ofctl add-flow br-ovs arp,actions=normal
ovs-ofctl add-flow br-ovs "table=0, ip,ct_state=-trk actions=
ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=
ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=
Establish a TCP and UDP connection and let it reach the hardware aging timeout.
The offload timeout is controlled with the following sysctl parameters:
net.netfilter.
TCP: net.netfilter.
UDP: net.netfilter.
* What it could break.
N/A
CVE References
Changed in linux-bluefield (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Bodong Wang (bodong-wang) |
importance: | Undecided → Medium |
Changed in linux-bluefield (Ubuntu): | |
status: | New → Invalid |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in linux-bluefield (Ubuntu): | |
status: | Invalid → Fix Committed |
Changed in linux-bluefield (Ubuntu): | |
status: | Fix Committed → Fix Released |
This bug is awaiting verification that the linux-bluefield /5.4.0- 1042.47 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- focal' to 'verification- done-focal' . If the problem still exists, change the tag 'verification- needed- focal' to 'verification- failed- focal'.
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!