Thread (26 messages) 26 messages, 5 authors, 2025-01-21

Re: [PATCH net v3 6/9] tun: Extract the vnet handling code

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2025-01-17 10:42:30
Also in: kvm, linux-doc, linux-kselftest, lkml, virtualization

Akihiko Odaki wrote:
quoted hunk ↗ jump to hunk
The vnet handling code will be reused by tap.

Signed-off-by: Akihiko Odaki <redacted>
---
 MAINTAINERS            |   2 +-
 drivers/net/Makefile   |   3 +-
 drivers/net/tun.c      | 174 +-----------------------------------------------
 drivers/net/tun_vnet.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/tun_vnet.h |  25 +++++++
 5 files changed, 205 insertions(+), 174 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 910305c11e8a..bc32b7e23c79 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23902,7 +23902,7 @@ W:	http://vtun.sourceforge.net/tun
 F:	Documentation/networking/tuntap.rst
 F:	arch/um/os-Linux/drivers/
 F:	drivers/net/tap.c
-F:	drivers/net/tun.c
+F:	drivers/net/tun*
 
 TURBOCHANNEL SUBSYSTEM
 M:	"Maciej W. Rozycki" <macro@orcam.me.uk>
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 13743d0e83b5..bb8eb3053772 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -29,7 +29,8 @@ obj-y += mdio/
 obj-y += pcs/
 obj-$(CONFIG_RIONET) += rionet.o
 obj-$(CONFIG_NET_TEAM) += team/
-obj-$(CONFIG_TUN) += tun.o
+obj-$(CONFIG_TUN) += tun-drv.o
+tun-drv-y := tun.o tun_vnet.o
 obj-$(CONFIG_TAP) += tap.o
 obj-$(CONFIG_VETH) += veth.o
 obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
Let's figure out how to do this. See also comment in 9/9.

Otherwise the rest of the patch looks fine.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help