qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Prashant Bhole <prashantbhole.linux@gmail.com>
To: "Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org
Cc: Song Liu <songliubraving@fb.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>,
	Prashant Bhole <prashantbhole.linux@gmail.com>,
	kvm@vger.kernel.org, Yonghong Song <yhs@fb.com>,
	Andrii Nakryiko <andriin@fb.com>,
	"David S . Miller" <davem@davemloft.net>
Subject: [RFC 0/3] Qemu: virtio-net XDP offload
Date: Tue, 26 Nov 2019 19:09:11 +0900	[thread overview]
Message-ID: <20191126100914.5150-1-prashantbhole.linux@gmail.com> (raw)

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



             reply	other threads:[~2019-11-26 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 10:09 Prashant Bhole [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191126100914.5150-1-prashantbhole.linux@gmail.com \
    --to=prashantbhole.linux@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).