Message ID | 20250415-b4-ovpn-v26-0-577f6097b964@openvpn.net (mailing list archive) |
---|---|
Headers | show |
Series | Introducing OpenVPN Data Channel Offload | expand |
2025-04-15, 13:17:17 +0200, Antonio Quartulli wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_init > * fixed author in MODULE_AUTHOR() > * properly indented checks in ovpn.yaml > * switched from TSTATS to DSTATS > * removed obsolete comment in ovpn_socket_new() > * removed unrelated hunk in ovpn_socket_new() > > The latest code can also be found at: > > https://github.com/OpenVPN/ovpn-net-next > > Thanks a lot! > Best Regards, > > Antonio Quartulli > OpenVPN Inc. > > --- > Antonio Quartulli (23): > net: introduce OpenVPN Data Channel Offload (ovpn) > ovpn: add basic netlink support > ovpn: add basic interface creation/destruction/management routines > ovpn: keep carrier always on for MP interfaces > ovpn: introduce the ovpn_peer object > ovpn: introduce the ovpn_socket object > ovpn: implement basic TX path (UDP) > ovpn: implement basic RX path (UDP) > ovpn: implement packet processing > ovpn: store tunnel and transport statistics > ovpn: implement TCP transport > skb: implement skb_send_sock_locked_with_flags() > ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg > ovpn: implement multi-peer support > ovpn: implement peer lookup logic > ovpn: implement keepalive mechanism > ovpn: add support for updating local or remote UDP endpoint > ovpn: implement peer add/get/dump/delete via netlink > ovpn: implement key add/get/del/swap via netlink > ovpn: kill key and notify userspace in case of IV exhaustion > ovpn: notify userspace when a peer is deleted > ovpn: add basic ethtool support > testing/selftests: add test tool and scripts for ovpn module The changes since v25 lgtm: Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Hello. On úterý 15. dubna 2025 13:17:17, středoevropský letní čas Antonio Quartulli wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_init > * fixed author in MODULE_AUTHOR() > * properly indented checks in ovpn.yaml > * switched from TSTATS to DSTATS > * removed obsolete comment in ovpn_socket_new() > * removed unrelated hunk in ovpn_socket_new() > > The latest code can also be found at: > > https://github.com/OpenVPN/ovpn-net-next Thank you for this. I've backported the submission for my local v6.14-based build (had to adjust for 69c7be1b903fca) and I'm using it now with [1] as you've suggested previously. So far so good. Feel free to add my: Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> A couple of notes if I may: 1. is it expected for then tun iface to stay after the connection is brought down? If that matters, I'm using NetworkManager for managing my OpenVPN connections 2. a userspace nit probably not relevant to this submission: the daemon still reports "DCO version:" but with "N/A" value because that version file under /sys is not presented any more like it was with an out-of-tree v2 implementation [1]: https://github.com/mandelbitdev/openvpn/tree/gianmarco/179-ovpn-support > > Thanks a lot! > Best Regards, > > Antonio Quartulli > OpenVPN Inc. > > --- > Antonio Quartulli (23): > net: introduce OpenVPN Data Channel Offload (ovpn) > ovpn: add basic netlink support > ovpn: add basic interface creation/destruction/management routines > ovpn: keep carrier always on for MP interfaces > ovpn: introduce the ovpn_peer object > ovpn: introduce the ovpn_socket object > ovpn: implement basic TX path (UDP) > ovpn: implement basic RX path (UDP) > ovpn: implement packet processing > ovpn: store tunnel and transport statistics > ovpn: implement TCP transport > skb: implement skb_send_sock_locked_with_flags() > ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg > ovpn: implement multi-peer support > ovpn: implement peer lookup logic > ovpn: implement keepalive mechanism > ovpn: add support for updating local or remote UDP endpoint > ovpn: implement peer add/get/dump/delete via netlink > ovpn: implement key add/get/del/swap via netlink > ovpn: kill key and notify userspace in case of IV exhaustion > ovpn: notify userspace when a peer is deleted > ovpn: add basic ethtool support > testing/selftests: add test tool and scripts for ovpn module > > Documentation/netlink/specs/ovpn.yaml | 367 +++ > Documentation/netlink/specs/rt-link.yaml | 16 + > MAINTAINERS | 11 + > drivers/net/Kconfig | 15 + > drivers/net/Makefile | 1 + > drivers/net/ovpn/Makefile | 22 + > drivers/net/ovpn/bind.c | 55 + > drivers/net/ovpn/bind.h | 101 + > drivers/net/ovpn/crypto.c | 210 ++ > drivers/net/ovpn/crypto.h | 145 ++ > drivers/net/ovpn/crypto_aead.c | 383 ++++ > drivers/net/ovpn/crypto_aead.h | 29 + > drivers/net/ovpn/io.c | 446 ++++ > drivers/net/ovpn/io.h | 34 + > drivers/net/ovpn/main.c | 274 +++ > drivers/net/ovpn/main.h | 14 + > drivers/net/ovpn/netlink-gen.c | 213 ++ > drivers/net/ovpn/netlink-gen.h | 41 + > drivers/net/ovpn/netlink.c | 1258 +++++++++++ > drivers/net/ovpn/netlink.h | 18 + > drivers/net/ovpn/ovpnpriv.h | 55 + > drivers/net/ovpn/peer.c | 1365 +++++++++++ > drivers/net/ovpn/peer.h | 163 ++ > drivers/net/ovpn/pktid.c | 129 ++ > drivers/net/ovpn/pktid.h | 86 + > drivers/net/ovpn/proto.h | 118 + > drivers/net/ovpn/skb.h | 61 + > drivers/net/ovpn/socket.c | 233 ++ > drivers/net/ovpn/socket.h | 49 + > drivers/net/ovpn/stats.c | 21 + > drivers/net/ovpn/stats.h | 47 + > drivers/net/ovpn/tcp.c | 598 +++++ > drivers/net/ovpn/tcp.h | 36 + > drivers/net/ovpn/udp.c | 439 ++++ > drivers/net/ovpn/udp.h | 25 + > include/linux/skbuff.h | 2 + > include/uapi/linux/if_link.h | 15 + > include/uapi/linux/ovpn.h | 109 + > include/uapi/linux/udp.h | 1 + > net/core/skbuff.c | 18 +- > net/ipv6/af_inet6.c | 1 + > tools/testing/selftests/Makefile | 1 + > tools/testing/selftests/net/ovpn/.gitignore | 2 + > tools/testing/selftests/net/ovpn/Makefile | 31 + > tools/testing/selftests/net/ovpn/common.sh | 92 + > tools/testing/selftests/net/ovpn/config | 10 + > tools/testing/selftests/net/ovpn/data64.key | 5 + > tools/testing/selftests/net/ovpn/ovpn-cli.c | 2376 ++++++++++++++++++++ > tools/testing/selftests/net/ovpn/tcp_peers.txt | 5 + > .../testing/selftests/net/ovpn/test-chachapoly.sh | 9 + > .../selftests/net/ovpn/test-close-socket-tcp.sh | 9 + > .../selftests/net/ovpn/test-close-socket.sh | 45 + > tools/testing/selftests/net/ovpn/test-float.sh | 9 + > tools/testing/selftests/net/ovpn/test-tcp.sh | 9 + > tools/testing/selftests/net/ovpn/test.sh | 113 + > tools/testing/selftests/net/ovpn/udp_peers.txt | 5 + > 56 files changed, 9940 insertions(+), 5 deletions(-) > --- > base-commit: 23f09f01b495cc510a19b30b6093fb4cb0284aaf > change-id: 20241002-b4-ovpn-eeee35c694a2 > > Best regards, >
Hi Oleksandr, Thanks a lot for testing! On 17/04/2025 11:51, Oleksandr Natalenko wrote: > Hello. > > On úterý 15. dubna 2025 13:17:17, středoevropský letní čas Antonio Quartulli wrote: >> Notable changes since v25: >> * removed netdev notifier (was only used for our own devices) >> * added .dellink implementation to address what was previously >> done in notifier >> * removed .ndo_open and moved netif_carrier_off() call to .ndo_init >> * fixed author in MODULE_AUTHOR() >> * properly indented checks in ovpn.yaml >> * switched from TSTATS to DSTATS >> * removed obsolete comment in ovpn_socket_new() >> * removed unrelated hunk in ovpn_socket_new() >> >> The latest code can also be found at: >> >> https://github.com/OpenVPN/ovpn-net-next > > Thank you for this. I've backported the submission for my local v6.14-based build (had to adjust for 69c7be1b903fca) and I'm using it now with [1] as you've suggested previously. So far so good. Feel free to add my: > > Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> > > A couple of notes if I may: > > 1. is it expected for then tun iface to stay after the connection is brought down? If that matters, I'm using NetworkManager for managing my OpenVPN connections If the interface is created by openvpn in userspace, the latter should also destroy it during cleanup. > 2. a userspace nit probably not relevant to this submission: the daemon still reports "DCO version:" but with "N/A" value because that version file under /sys is not presented any more like it was with an out-of-tree v2 implementation Thanks a lot, I have reported this point to gerrit (where the patch is being reviewed): https://gerrit.openvpn.net/c/openvpn/+/941 Regards, > > [1]: https://github.com/mandelbitdev/openvpn/tree/gianmarco/179-ovpn-support > >> >> Thanks a lot! >> Best Regards, >> >> Antonio Quartulli >> OpenVPN Inc. >> >> --- >> Antonio Quartulli (23): >> net: introduce OpenVPN Data Channel Offload (ovpn) >> ovpn: add basic netlink support >> ovpn: add basic interface creation/destruction/management routines >> ovpn: keep carrier always on for MP interfaces >> ovpn: introduce the ovpn_peer object >> ovpn: introduce the ovpn_socket object >> ovpn: implement basic TX path (UDP) >> ovpn: implement basic RX path (UDP) >> ovpn: implement packet processing >> ovpn: store tunnel and transport statistics >> ovpn: implement TCP transport >> skb: implement skb_send_sock_locked_with_flags() >> ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg >> ovpn: implement multi-peer support >> ovpn: implement peer lookup logic >> ovpn: implement keepalive mechanism >> ovpn: add support for updating local or remote UDP endpoint >> ovpn: implement peer add/get/dump/delete via netlink >> ovpn: implement key add/get/del/swap via netlink >> ovpn: kill key and notify userspace in case of IV exhaustion >> ovpn: notify userspace when a peer is deleted >> ovpn: add basic ethtool support >> testing/selftests: add test tool and scripts for ovpn module >> >> Documentation/netlink/specs/ovpn.yaml | 367 +++ >> Documentation/netlink/specs/rt-link.yaml | 16 + >> MAINTAINERS | 11 + >> drivers/net/Kconfig | 15 + >> drivers/net/Makefile | 1 + >> drivers/net/ovpn/Makefile | 22 + >> drivers/net/ovpn/bind.c | 55 + >> drivers/net/ovpn/bind.h | 101 + >> drivers/net/ovpn/crypto.c | 210 ++ >> drivers/net/ovpn/crypto.h | 145 ++ >> drivers/net/ovpn/crypto_aead.c | 383 ++++ >> drivers/net/ovpn/crypto_aead.h | 29 + >> drivers/net/ovpn/io.c | 446 ++++ >> drivers/net/ovpn/io.h | 34 + >> drivers/net/ovpn/main.c | 274 +++ >> drivers/net/ovpn/main.h | 14 + >> drivers/net/ovpn/netlink-gen.c | 213 ++ >> drivers/net/ovpn/netlink-gen.h | 41 + >> drivers/net/ovpn/netlink.c | 1258 +++++++++++ >> drivers/net/ovpn/netlink.h | 18 + >> drivers/net/ovpn/ovpnpriv.h | 55 + >> drivers/net/ovpn/peer.c | 1365 +++++++++++ >> drivers/net/ovpn/peer.h | 163 ++ >> drivers/net/ovpn/pktid.c | 129 ++ >> drivers/net/ovpn/pktid.h | 86 + >> drivers/net/ovpn/proto.h | 118 + >> drivers/net/ovpn/skb.h | 61 + >> drivers/net/ovpn/socket.c | 233 ++ >> drivers/net/ovpn/socket.h | 49 + >> drivers/net/ovpn/stats.c | 21 + >> drivers/net/ovpn/stats.h | 47 + >> drivers/net/ovpn/tcp.c | 598 +++++ >> drivers/net/ovpn/tcp.h | 36 + >> drivers/net/ovpn/udp.c | 439 ++++ >> drivers/net/ovpn/udp.h | 25 + >> include/linux/skbuff.h | 2 + >> include/uapi/linux/if_link.h | 15 + >> include/uapi/linux/ovpn.h | 109 + >> include/uapi/linux/udp.h | 1 + >> net/core/skbuff.c | 18 +- >> net/ipv6/af_inet6.c | 1 + >> tools/testing/selftests/Makefile | 1 + >> tools/testing/selftests/net/ovpn/.gitignore | 2 + >> tools/testing/selftests/net/ovpn/Makefile | 31 + >> tools/testing/selftests/net/ovpn/common.sh | 92 + >> tools/testing/selftests/net/ovpn/config | 10 + >> tools/testing/selftests/net/ovpn/data64.key | 5 + >> tools/testing/selftests/net/ovpn/ovpn-cli.c | 2376 ++++++++++++++++++++ >> tools/testing/selftests/net/ovpn/tcp_peers.txt | 5 + >> .../testing/selftests/net/ovpn/test-chachapoly.sh | 9 + >> .../selftests/net/ovpn/test-close-socket-tcp.sh | 9 + >> .../selftests/net/ovpn/test-close-socket.sh | 45 + >> tools/testing/selftests/net/ovpn/test-float.sh | 9 + >> tools/testing/selftests/net/ovpn/test-tcp.sh | 9 + >> tools/testing/selftests/net/ovpn/test.sh | 113 + >> tools/testing/selftests/net/ovpn/udp_peers.txt | 5 + >> 56 files changed, 9940 insertions(+), 5 deletions(-) >> --- >> base-commit: 23f09f01b495cc510a19b30b6093fb4cb0284aaf >> change-id: 20241002-b4-ovpn-eeee35c694a2 >> >> Best regards, >> > >
On 4/15/25 1:17 PM, Antonio Quartulli wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_init > * fixed author in MODULE_AUTHOR() > * properly indented checks in ovpn.yaml > * switched from TSTATS to DSTATS > * removed obsolete comment in ovpn_socket_new() > * removed unrelated hunk in ovpn_socket_new() > > The latest code can also be found at: > > https://github.com/OpenVPN/ovpn-net-next I think it's finally time to merge this. Thanks Anotonio for your patience and persistence and thank you Sabrina for the huge review effort. /P
Hello: This series was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: On Tue, 15 Apr 2025 13:17:17 +0200 you wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_init > * fixed author in MODULE_AUTHOR() > * properly indented checks in ovpn.yaml > * switched from TSTATS to DSTATS > * removed obsolete comment in ovpn_socket_new() > * removed unrelated hunk in ovpn_socket_new() > > [...] Here is the summary with links: - [net-next,v26,01/23] net: introduce OpenVPN Data Channel Offload (ovpn) https://git.kernel.org/netdev/net-next/c/9f23d943eb6b - [net-next,v26,02/23] ovpn: add basic netlink support https://git.kernel.org/netdev/net-next/c/b7a63391aa98 - [net-next,v26,03/23] ovpn: add basic interface creation/destruction/management routines https://git.kernel.org/netdev/net-next/c/c2d950c4672a - [net-next,v26,04/23] ovpn: keep carrier always on for MP interfaces https://git.kernel.org/netdev/net-next/c/8327a3baa9b0 - [net-next,v26,05/23] ovpn: introduce the ovpn_peer object https://git.kernel.org/netdev/net-next/c/80747caef33d - [net-next,v26,06/23] ovpn: introduce the ovpn_socket object https://git.kernel.org/netdev/net-next/c/f6226ae7a0cd - [net-next,v26,07/23] ovpn: implement basic TX path (UDP) https://git.kernel.org/netdev/net-next/c/08857b5ec5d9 - [net-next,v26,08/23] ovpn: implement basic RX path (UDP) https://git.kernel.org/netdev/net-next/c/ab66abbc769b - [net-next,v26,09/23] ovpn: implement packet processing https://git.kernel.org/netdev/net-next/c/8534731dbf2d - [net-next,v26,10/23] ovpn: store tunnel and transport statistics https://git.kernel.org/netdev/net-next/c/04ca14955f9a - [net-next,v26,11/23] ovpn: implement TCP transport https://git.kernel.org/netdev/net-next/c/11851cbd60ea - [net-next,v26,12/23] skb: implement skb_send_sock_locked_with_flags() https://git.kernel.org/netdev/net-next/c/17240749f26e - [net-next,v26,13/23] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg https://git.kernel.org/netdev/net-next/c/36bb1d713a15 - [net-next,v26,14/23] ovpn: implement multi-peer support https://git.kernel.org/netdev/net-next/c/05003b408c20 - [net-next,v26,15/23] ovpn: implement peer lookup logic https://git.kernel.org/netdev/net-next/c/a3aaef8cd173 - [net-next,v26,16/23] ovpn: implement keepalive mechanism https://git.kernel.org/netdev/net-next/c/3ecfd9349f40 - [net-next,v26,17/23] ovpn: add support for updating local or remote UDP endpoint https://git.kernel.org/netdev/net-next/c/f0281c1d3732 - [net-next,v26,18/23] ovpn: implement peer add/get/dump/delete via netlink https://git.kernel.org/netdev/net-next/c/1d36a36f6d53 - [net-next,v26,19/23] ovpn: implement key add/get/del/swap via netlink https://git.kernel.org/netdev/net-next/c/203e2bf55990 - [net-next,v26,20/23] ovpn: kill key and notify userspace in case of IV exhaustion https://git.kernel.org/netdev/net-next/c/89d3c0e4612a - [net-next,v26,21/23] ovpn: notify userspace when a peer is deleted https://git.kernel.org/netdev/net-next/c/a215d253c17a - [net-next,v26,22/23] ovpn: add basic ethtool support https://git.kernel.org/netdev/net-next/c/b756861e6e63 - [net-next,v26,23/23] testing/selftests: add test tool and scripts for ovpn module https://git.kernel.org/netdev/net-next/c/959bc330a439 You are awesome, thank you!
On 17/04/2025 12:48, Paolo Abeni wrote: > On 4/15/25 1:17 PM, Antonio Quartulli wrote: >> Notable changes since v25: >> * removed netdev notifier (was only used for our own devices) >> * added .dellink implementation to address what was previously >> done in notifier >> * removed .ndo_open and moved netif_carrier_off() call to .ndo_init >> * fixed author in MODULE_AUTHOR() >> * properly indented checks in ovpn.yaml >> * switched from TSTATS to DSTATS >> * removed obsolete comment in ovpn_socket_new() >> * removed unrelated hunk in ovpn_socket_new() >> >> The latest code can also be found at: >> >> https://github.com/OpenVPN/ovpn-net-next > > I think it's finally time to merge this. Thanks Anotonio for your > patience and persistence and thank you Sabrina for the huge review effort. Thanks Paolo and thank you all for the reviews (especially Sabrina!), suggestions and hints! It's been a bumpy ride, but we crossed the finish line! :-) Cheers,