qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/3] Qemu: virtio-net XDP offload
@ 2019-11-26 10:09 Prashant Bhole
  2019-11-26 10:09 ` [RFC 1/3] configure: add libbpf support Prashant Bhole
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Prashant Bhole @ 2019-11-26 10:09 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, qemu-devel
  Cc: Song Liu, Jakub Kicinski, Jesper Dangaard Brouer, Daniel Borkmann,
	netdev, John Fastabend, Alexei Starovoitov, Martin KaFai Lau,
	Prashant Bhole, kvm, Yonghong Song, Andrii Nakryiko,
	David S . Miller

Note: This RFC has been sent to netdev as well as qemu-devel lists

This patchset implements XDP offload feature in qemu. The successful
operation of this feature depends on availability of XDP offload
feature in guest, qemu and host. When this feature isn't available in
qemu or host, the request from guest to offload an XDP program should
fail.

Patch 1/3 adds support for libbpf in configure script.
Patch 2/2 enables offloading of ebpf program.
Patch 3/3 enabled offloading of ebpf map.

Points for improvement (TODO):
- In future virtio can have feature bit for offloading capability

- TUNGETFEATURES should have a flag to notify about offloading
  capability

- Submit virtio spec patch to describe XDP offloading feature

- DoS: Offloaded map uses host's memory which is other than what has
  been allocated for the guest. Offloading many maps of large size can
  be one of the DoS strategy. Hence qemu should have parameter to
  limit how many maps guest can offload or how much memory offloaded
  maps use.

Note:
This set directly modifies virtio_net.h header instead of
importing it from existing kernel headers because relevant changes
aren't present in kernel repository yet. Hence changes to virtio_net.h
are for RFC purpose only.


Jason Wang (2):
  virtio-net: add support for offloading XDP program
  virtio-net: add support for offloading an ebpf map

Prashant Bhole (1):
  configure: add libbpf support

 configure                                   |  23 +++
 hw/net/Makefile.objs                        |   2 +
 hw/net/virtio-net.c                         | 157 ++++++++++++++++++++
 include/net/tap.h                           |   2 +
 include/standard-headers/linux/virtio_net.h |  50 +++++++
 net/Makefile.objs                           |   1 +
 net/tap-bsd.c                               |   5 +
 net/tap-linux.c                             |  48 ++++++
 net/tap-linux.h                             |   1 +
 net/tap-solaris.c                           |   5 +
 net/tap-stub.c                              |   5 +
 net/tap.c                                   |   7 +
 net/tap_int.h                               |   1 +
 13 files changed, 307 insertions(+)

-- 
2.20.1



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

end of thread, other threads:[~2019-11-27  1:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-26 10:09 [RFC 0/3] Qemu: virtio-net XDP offload Prashant Bhole
2019-11-26 10:09 ` [RFC 1/3] configure: add libbpf support Prashant Bhole
2019-11-26 10:09 ` [RFC 2/3] virtio-net: add support for offloading XDP program Prashant Bhole
2019-11-26 10:09 ` [RFC 3/3] virtio-net: add support for offloading an ebpf map Prashant Bhole
2019-11-26 10:33 ` [RFC 0/3] Qemu: virtio-net XDP offload no-reply
2019-11-27  1:27   ` Prashant Bhole
2019-11-26 10:36 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).