Thread (10 messages) 10 messages, 4 authors, 2025-10-23

Re: [PATCH net v3 3/3] ovpn: use datagram_poll_queue for socket readiness in TCP

From: Antonio Quartulli <antonio@openvpn.net>
Date: 2025-10-23 08:03:55

On 21/10/2025 12:09, Ralf Lici wrote:
openvpn TCP encapsulation uses a custom queue to deliver packets to
userspace. Currently it relies on datagram_poll, which checks
sk_receive_queue, leading to false readiness signals when that queue
contains non-userspace packets.

Switch ovpn_tcp_poll to use datagram_poll_queue with the peer's
user_queue, ensuring poll only signals readiness when userspace data is
actually available. Also refactor ovpn_tcp_poll in order to enforce the
assumption we can make on the lifetime of ovpn_sock and peer.

Fixes: 11851cbd60ea ("ovpn: implement TCP transport")
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Signed-off-by: Ralf Lici <redacted>
Jakub,

fell free to merge this commit directly to net, as it's not useful to 
have it go through my tree without the other patches.


Regards,

-- 
Antonio Quartulli
OpenVPN Inc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help