ovpn: select physical TX queues from the outer flow
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net: allow selecting TX queues from the packet hashinclude/ net/ | +24 | 0 replies | |
| 2/4 | ovpn: select physical TX queues from the outer flowdrivers/ drivers/ | +6 | 0 replies | |
| 3/4 | net: restore __get_hash_from_flowi4include/ include/ net/ | +30 | 0 replies | |
| 4/4 | ovpn: hash the outer flow from its flowidrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Openvpn-devel] [PATCH ovpn net-next 0/4] ovpn: select physical TX queues from the outer flow
Hi,
ovpn keeps the inner socket as skb->sk on encrypted UDP packets, so that write accounting and TCP Small Queues keep working. As a consequence, netdev_pick_tx selects the lower device's TX queue as if the packet still belonged to the inner flow: from that socket's cached queue, from XPS according to the transmitting CPU, or from a recorded RX queue. When several inner flows are sent from different CPUs, one outer OpenVPN flow, which carries a single packet-ID sequence, is spread over several hardware queues, and the resulting reordering can exceed the receiver's replay window.
Patch 1 adds an skb bit which makes netdev_pick_tx select the queue from the packet hash instead, and patch 2 sets it in ovpn after clearing the inner hash, so that the lower device hashes the outer tuple. Patches 3 and 4 let ovpn set that hash directly from the flowi it routes with instead of dissecting every outer packet, which requires restoring __get_hash_from_flowi4.
Patches 1 and 3 change net core code (include/linux/skbuff.h, net/core/dev.c, include/net/flow.h and net/core/flow_dissector.c) and need review from the core networking maintainers when the series is forwarded to netdev. The series also applies cleanly to the current net-next.
With one peer between two directly connected mlx5 ports and four or eight inner TCP flows sent from different CPUs, the outer flow used five to nine TX queues and the receiver rejected 2000 to 4800 packets per 20-second run because of the replay window. With the series, all runs used a single TX queue and no packet was rejected.
Thanks,
Ralf Lici
Mandelbit Srl
---
Ralf Lici (4):
net: allow selecting TX queues from the packet hash
ovpn: select physical TX queues from the outer flow
net: restore __get_hash_from_flowi4
ovpn: hash the outer flow from its flowi
drivers/net/ovpn/io.c | 1 + drivers/net/ovpn/udp.c | 9 +++++++++ include/linux/skbuff.h | 31 +++++++++++++++++++++++++++++++ include/net/flow.h | 1 + net/core/dev.c | 8 ++++++-- net/core/flow_dissector.c | 16 ++++++++++++++++ 6 files changed, 64 insertions(+), 2 deletions(-)
base-commit: 7ccc5e05043b1bb84326b19a2b05938d8f7a2ae6
Signature · 8 lines
2.56.0 _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel