[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251016142207.411549-1-ralf@mandelbit.com>
Date: Thu, 16 Oct 2025 16:22:04 +0200
From: Ralf Lici <ralf@...delbit.com>
To: netdev@...r.kernel.org
Cc: Ralf Lici <ralf@...delbit.com>,
Sabrina Dubroca <sd@...asysnail.net>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net 0/3] fix poll behaviour for TCP-based tunnel protocols
Hi all,
This patch series introduces a polling function for datagram-style
sockets that operates on custom skb queues, and updates ovpn (the
OpenVPN data-channel offload module) and espintcp (the TCP Encapsulation
of IKE and IPsec Packets implementation) to use it accordingly.
Protocols like the aforementioned one decapsulate packets received over
TCP and deliver userspace-bound data through a separate skb queue, not
the standard sk_receive_queue. Previously, both relied on
datagram_poll(), which would signal readiness based on non-userspace
packets, leading to misleading poll results and unnecessary recv
attempts in userspace.
Patch 1 introduces datagram_poll_queue(), a variant of datagram_poll()
that accepts an explicit receive queue. Patch 2 and 3 update
ovpn_tcp_poll() and espintcp_poll() respectively to use this helper,
ensuring readiness is only signaled when userspace data is available.
Each patch is self-contained and the ovpn one includes rationale and
lifecycle enforcement where appropriate.
Thanks for your time and feedback.
Best Regards,
Ralf Lici
Mandelbit Srl
---
Ralf Lici (3):
net: datagram: introduce datagram_poll_queue for custom receive queues
espintcp: use datagram_poll_queue for socket readiness
ovpn: use datagram_poll_queue for socket readiness in TCP
drivers/net/ovpn/tcp.c | 26 ++++++++++++++++++++----
include/linux/skbuff.h | 3 +++
net/core/datagram.c | 45 +++++++++++++++++++++++++++++-------------
net/xfrm/espintcp.c | 6 +-----
4 files changed, 57 insertions(+), 23 deletions(-)
--
2.51.0
Powered by blists - more mailing lists