Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH RFC iproute2-next 0/2] ip: add "ip vsock" to move the guest vsock device to a netns
@ 2026-11-05 19:30 Bobby Eshleman
  2026-11-05 19:30 ` [PATCH RFC iproute2-next 1/2] uapi: add vsock_netlink.h Bobby Eshleman
  2026-11-05 19:30 ` [PATCH RFC iproute2-next 2/2] ip: add "ip vsock" to move the guest vsock device to a netns Bobby Eshleman
  0 siblings, 2 replies; 5+ messages in thread
From: Bobby Eshleman @ 2026-11-05 19:30 UTC (permalink / raw)
  To: netdev
  Cc: David Ahern, Stephen Hemminger, Stefano Garzarella,
	virtualization, Bobby Eshleman, Bobby Eshleman

This adds iproute2 support for the "vsock" generic netlink family from
the kernel series "vsock: assign the guest vsock device to a network
namespace":

  https://lore.kernel.org/all/20261103-vsock-guest-ns-v5-0-48179b9b66b8@meta.com/

The guest's vsock device is not a netdev, so it cannot be moved with
"ip link set DEV netns". The kernel series adds VSOCK_CMD_DEV_NETNS_SET,
which assigns the device to the namespace the request was sent from, and
VSOCK_CMD_DEV_NETNS_GET, which reports where it is. This series exposes
both through a new "ip vsock" object:

  # ip netns add guest
  # ip vsock set netns guest
  # ip vsock show
  vsock netns guest
  # ip -n guest vsock show
  vsock

I considered using "ip link", but I opted away from that option to avoid
the scenario (however unlikely) of masking out / colliding with a netdev
with the name "vsock".

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
---
Bobby Eshleman (2):
      uapi: add vsock_netlink.h
      ip: add "ip vsock" to move the guest vsock device to a netns

 include/uapi/linux/vsock_netlink.h |  28 +++++
 ip/Makefile                        |   2 +-
 ip/ip.c                            |   3 +-
 ip/ip_common.h                     |   1 +
 ip/ipvsock.c                       | 205 +++++++++++++++++++++++++++++++++++++
 man/man8/ip-vsock.8                | 121 ++++++++++++++++++++++
 man/man8/ip.8                      |   7 +-
 7 files changed, 364 insertions(+), 3 deletions(-)
---
base-commit: 204a721033556114c81c47d00375f2d52e98e463
change-id: 20261105-vsock-guest-ns-4bf1ce74742e

Best regards,
-- 
Bobby Eshleman <bobbyeshleman@meta.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-06  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 19:30 [PATCH RFC iproute2-next 0/2] ip: add "ip vsock" to move the guest vsock device to a netns Bobby Eshleman
2026-11-05 19:30 ` [PATCH RFC iproute2-next 1/2] uapi: add vsock_netlink.h Bobby Eshleman
2026-11-05 19:30 ` [PATCH RFC iproute2-next 2/2] ip: add "ip vsock" to move the guest vsock device to a netns Bobby Eshleman
2026-11-06  9:26   ` Stephen Hemminger
2026-11-06  9:36   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox