netfilter: flowtable: add counter support in HW offload
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-bluefield (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
William Tu |
Bug Description
* Explain the bug(s)
While conntrack tuples are offloaded to hardware and conntrack packet accounting is enabled, offloaded packets aren't counted.
* Brief explanation of fixes
Cherry-pick. No adaptation. First commit for SW, second commit of HW offloaded rules.
ef803b3cf96a netfilter: flowtable: add counter support in HW offload
9312eabab4a6 netfilter: conntrack: add nf_ct_acct_add()
note: need to change a little due to cherry-pick conflict with
24384e28586c netfilter: flowtable: Set offload timeouts according to proto values
* 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=
Run a TCP connection, e.g:
on mlx5 VF1 iperf -s
on mlx5 VF2 iperf -c <ip> -t 10
Optional: In different terminal, while traffic is running, check for offload:
tcpdump -nnepi <RELEVANT_MLX5_REP> tcp
and see no iperf tcp packets.
Dump conntrack with relevant ip:
echo "1" > /proc/sys/
cat /proc/net/
See counters (packets=.*) advancing while tuples were offloaded:
ipv4 2 tcp 6 src=1.1.1.2 dst=1.1.1.3 sport=56394 dport=5001 packets=2 bytes=112 src=1.1.1.3 dst=1.1.1.2 sport=5001 dport=56394 packets=1777 bytes=665340 [HW_OFFLOAD] mark=0 zone=0 use=3
* What it could break.
Nothing.
CVE References
description: | updated |
description: | updated |
summary: |
- Add HW offloaded CT stats + netfilter: flowtable: add counter support in HW offload |
description: | updated |
Changed in linux-bluefield (Ubuntu Focal): | |
assignee: | nobody → William Tu (wtu) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | In Progress → Confirmed |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | Confirmed → In Progress |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
description: | updated |
tags: |
added: verification-done-focal removed: verification-needed-focal |
This bug is awaiting verification that the linux-bluefield /5.4.0- 1060.66 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!