Skip to content

High-speed tun receive and xmit

Rusty Russell lkml netdev virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 29 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5virtio: put last_used and last_avail index into ring itself.drivers/virtio/virtio_ring.c include/linux/virtio_config.h include/linux/virtio_ring.h+26 -90 replies
1/5virtio: put last_used and last_avail index into ring itself.drivers/virtio/virtio_ring.c include/linux/virtio_config.h include/linux/virtio_ring.h+26 -90 replies
2/5/dev/vring: simple userspace-kernel ringbuffer interface.drivers/char/Kconfig drivers/char/Makefile drivers/char/vring.c +1 more+469 -00 replies
2/5/dev/vring: simple userspace-kernel ringbuffer interface.drivers/char/Kconfig drivers/char/Makefile drivers/char/vring.c +1 more+469 -017 replies
3/5/dev/vring limit and base ioctlsDocumentation/ioctl-number.txt drivers/char/vring.c include/linux/vring.h+45 -40 replies
3/5/dev/vring limit and base ioctlsDocumentation/ioctl-number.txt drivers/char/vring.c include/linux/vring.h+45 -40 replies
4/5tun: vringfd receive support.drivers/net/Kconfig drivers/net/tun.c include/linux/if_tun.h+162 -00 replies
4/5tun: vringfd receive support.drivers/net/Kconfig drivers/net/tun.c include/linux/if_tun.h+162 -00 replies
5/5tun: vringfd xmit support.drivers/net/tun.c include/linux/if_tun.h+351 -600 replies
5/5tun: vringfd xmit support.drivers/net/tun.c include/linux/if_tun.h+351 -600 replies
5/5tun: vringfd xmit support.drivers/net/tun.c include/linux/if_tun.h+351 -6012 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] High-speed tun receive and xmit

kvm (and lguest!) want to get more speed out of the tun device. We already have an ABI for guest<->host comms, called virtio_ring; extending tun to understand this (with its async nature and batching) make for an efficient network.

But moreover: the same things that make virtio a good guest<->host transport make it appealing as a userspace<->kernel transport. So rather than do something just for tun, we create a /dev/vring. We could do a system call, but /dev/vring is sufficient. It is a nice, simple format for normal tun usage too.

We do need a small (backwards-compatible) extension to the ring format if we're going to do this however, since we didn't previously expose the consumer's view of the producer (and vice verse) in the ring because the other end doesn't need to see it. However, it means that a middleman (as the kvm or lguest launcher process now becomes) cannot save and restore all the ring state.

Cheers,
Rusty.