Hi, This series adds support for preserving GSO and GRO batching across ovpn, including forwarded TCP traffic. The transmit patches let GSO skbs reach ovpn, complete each inner packet's checksum before encryption, and, when the layout permits, put the encrypted records into a UDP GSO skb. Ordinary packets and frag-list GSO children retain the existing in-place path.
On receive, ovpn uses UDP GRO to collect compatible encrypted records in a frag-list and then decrypts them individually. The series also includes an AEAD helper refactor and small transmit and receive prefetch changes. The patch messages contain the measurements. The final patch adds an opt-in direct GRO mode for discussion. Unlike the default full-stack mode, it consumes DATA_V2 records in the GRO callback and bypasses parts of the outer receive stack, including TC, netfilter, socket XFRM policy and normal UDP accounting. Its advantage over the prefetched full-stack path is small in my latest 100-Gbit/s tests. Direct GRO also depends on a generic GRO ownership change in the preceding patch. That change, the skb_gro_receive_list export and UDP tunnel GRO callback accounting touch broader networking code. These prerequisites would need discussion on netdev before any merge (this RFC is first for feedback on the ovpn design). Thanks, Ralf Lici Mandelbit Srl --- Changes since v2 https://lore.kernel.org/openvpn-devel/[email protected]/ - Unclone incoming GRO aggregates before segmenting them in 5/9. (Sashiko) - Fix endianness bug serializing 1-byte netlink attr from 4-byte enum in 9/9. (Sashiko) Changes since v1 https://lore.kernel.org/openvpn-devel/[email protected]/ - Fix a couple of wrong assumptions in 5/9 ("ovpn: coalesce UDP data records with GRO"). (Sashiko) Ralf Lici (9): ovpn: advertise checksum offload for GSO packets ovpn: accept frag-list GSO input ovpn: refactor AEAD encryption helpers ovpn: convert GSO input into UDP GSO output ovpn: coalesce UDP data records with GRO ovpn: prefetch encrypted records before GRO batch decryption ovpn: prefetch GSO segments before in-place encryption net: gro: honor skbs consumed by protocol callbacks ovpn: add opt-in direct GRO receive mode Documentation/netlink/specs/rt-link.yaml | 12 + drivers/net/ovpn/crypto_aead.c | 182 +++++++--- drivers/net/ovpn/crypto_aead.h | 4 + drivers/net/ovpn/io.c | 281 +++++++++++++-- drivers/net/ovpn/io.h | 17 +- drivers/net/ovpn/main.c | 20 +- drivers/net/ovpn/ovpnpriv.h | 2 + drivers/net/ovpn/proto.h | 4 + drivers/net/ovpn/skb.h | 27 +- drivers/net/ovpn/stats.h | 16 +- drivers/net/ovpn/tcp.c | 4 +- drivers/net/ovpn/udp.c | 337 ++++++++++++++++-- include/net/gro.h | 19 +- include/uapi/linux/if_link.h | 6 + net/core/gro.c | 1 + net/ipv4/udp_offload.c | 3 +- tools/testing/selftests/net/ovpn/Makefile | 1 + tools/testing/selftests/net/ovpn/common.sh | 4 +- tools/testing/selftests/net/ovpn/ovpn-cli.c | 40 ++- .../selftests/net/ovpn/test-gro-direct.sh | 10 + tools/testing/selftests/net/ovpn/test.sh | 65 ++++ 21 files changed, 924 insertions(+), 131 deletions(-) create mode 100755 tools/testing/selftests/net/ovpn/test-gro-direct.sh base-commit: b8e9e7d82e7eefd5d2d528469d94ec20e96b38c3 -- 2.55.0 _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
