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

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).

At first, instead of adding the syscall wrappers, I wanted to integrate libbpf
library which resides in the Linux source tree under tools/lib/bpf. It appears
to be that by default it compiles to x64 on x64 arch - which can't be
integrated into Qemu  - and my attempts to compile the 32 bit versions have
failed. What's more interesting is that the vendors don't provide this library
in any package, which makes this library a nasty dependency.

Please share your thoughts :)

Sameeh Jubran (1):
  Add BPF support to qemu

 MAINTAINERS                     |   7 +
 bpf/Makefile.objs               |   1 +
 bpf/bpf_syscall.c               |  98 ++++++
 include/bpf/bpf_syscall.h       |  35 +++
 linux-headers/linux/bpf.h       | 673 ++++++++++++++++++++++++++++++++++++++++
 scripts/update-linux-headers.sh |   3 +-
 6 files changed, 816 insertions(+), 1 deletion(-)
 create mode 100644 bpf/Makefile.objs
 create mode 100644 bpf/bpf_syscall.c
 create mode 100644 include/bpf/bpf_syscall.h
 create mode 100644 linux-headers/linux/bpf.h

-- 
2.13.6

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

end of thread, other threads:[~2018-06-20 14:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 13:21 [Qemu-devel] [RFC 0/1] Add BPF suuport to Qemu Sameeh Jubran
2018-06-19 13:22 ` [Qemu-devel] [RFC 1/1] Add BPF support to qemu Sameeh Jubran
2018-06-19 14:41   ` Murilo Opsfelder Araujo
2018-06-19 14:46     ` Sameeh Jubran
2018-06-19 13:37 ` [Qemu-devel] [RFC 0/1] Add BPF suuport to Qemu Peter Maydell
2018-06-19 13:49 ` Daniel P. Berrangé
2018-06-19 14:37   ` Sameeh Jubran
2018-06-20  8:34     ` Daniel P. Berrangé
2018-06-20 14:43       ` Sameeh Jubran
2018-06-20  8:19   ` Jason Wang
2018-06-19 16:17 ` no-reply
2018-06-20  8:13 ` Jason Wang
2018-06-20 14:40   ` Sameeh Jubran

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).