qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v2 0/2] Add BPF suuport to Qemu
@ 2018-06-25 11:07 Sameeh Jubran
  2018-06-25 11:07 ` [Qemu-devel] [RFC v2 1/2] Add bpf support to qemu Sameeh Jubran
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Sameeh Jubran @ 2018-06-25 11:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yan Vugenfirer, Jason Wang, Michael S . Tsirkin, Amnon Ilan

From: Sameeh Jubran <sjubran@redhat.com>

The Berkeley Packet Filter has been in the kernel for a while now and I
think it is time that it is introduced to Qemu. This patch is an
infrastructure for any future usage of the BPF in Qemu.

It is important to note that the tun driver had started supporting using
BPF programs through ioctls (TUNSETSTEERINGEBPF and TUNSETFILTEREBPF).
My plan is to use the bpf support from within virtio-net in order to set
a bpf steering program to the tun device which would allow virtio-net to
support RSS feature https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html

Difference from v1:
* Used libbpf library provided by linux
* Added a configure option
* Added a sample patch with demonstrates how to use the libbpf library
  from within virtio-net. This patch should not be applied! It is for
  demonstration purposes only

The libbpf can be manually installed from the Linux source tree by running make
tools/bpf and make tools/bpf_install from the top level directory.

Please share your thoughts :)

v1 - https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg05307.html

Sameeh Jubran (2):
  Add bpf support to qemu
  virtio-net: Example Patch for using BPF

 MAINTAINERS                             |    6 +
 configure                               |   46 +
 hw/net/Makefile.objs                    |    4 +
 hw/net/virtio-net.c                     |    4 +
 include/standard-headers/linux/libbpf.h |  284 ++++
 linux-headers/linux/bpf.h               | 2669 +++++++++++++++++++++++++++++++
 scripts/update-linux-headers.sh         |   11 +-
 7 files changed, 3021 insertions(+), 3 deletions(-)
 create mode 100644 include/standard-headers/linux/libbpf.h
 create mode 100644 linux-headers/linux/bpf.h

-- 
2.13.6

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

end of thread, other threads:[~2018-07-02  5:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 11:07 [Qemu-devel] [RFC v2 0/2] Add BPF suuport to Qemu Sameeh Jubran
2018-06-25 11:07 ` [Qemu-devel] [RFC v2 1/2] Add bpf support to qemu Sameeh Jubran
2018-06-25 11:07 ` [Qemu-devel] [RFC v2 2/2] virtio-net: Example Patch for using BPF Sameeh Jubran
2018-06-25 11:22   ` Daniel P. Berrangé
2018-06-25 15:29     ` Sameeh Jubran
2018-06-25 11:16 ` [Qemu-devel] [RFC v2 0/2] Add BPF suuport to Qemu Peter Maydell
2018-06-25 11:21   ` Sameeh Jubran
2018-06-25 15:35     ` Daniel P. Berrangé
2018-06-30 18:56 ` no-reply
2018-07-02  5:20 ` 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).