From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Sameeh Jubran <sameeh@daynix.com>
Cc: qemu-devel@nongnu.org, Yan Vugenfirer <yan@daynix.com>,
Jason Wang <jasowang@redhat.com>, Amnon Ilan <ailan@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC v2 2/2] virtio-net: Example Patch for using BPF
Date: Mon, 25 Jun 2018 12:22:04 +0100 [thread overview]
Message-ID: <20180625112204.GH18580@redhat.com> (raw)
In-Reply-To: <20180625110706.23332-3-sameeh@daynix.com>
On Mon, Jun 25, 2018 at 02:07:06PM +0300, Sameeh Jubran wrote:
> From: Sameeh Jubran <sjubran@redhat.com>
>
> This commit is a sample only for using the libbpf in the code and
> shouldn't be committed.
>
> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
> ---
> hw/net/Makefile.objs | 4 ++++
> hw/net/virtio-net.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs
> index fa461d4463..0fb271436d 100644
> --- a/hw/net/Makefile.objs
> +++ b/hw/net/Makefile.objs
> @@ -37,6 +37,10 @@ obj-$(CONFIG_PSERIES) += spapr_llan.o
> obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o
>
> obj-$(CONFIG_VIRTIO_NET) += virtio-net.o
> +ifeq ($(CONFIG_BPF),y)
> + virtio-net.o-cflags := $(CFLAGS_BPF)
> + virtio-net.o-libs := $(LIBS_BPF)
> +endif
> obj-y += vhost_net.o
>
> obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 90502fca7c..b4840838c1 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -27,6 +27,7 @@
> #include "hw/virtio/virtio-access.h"
> #include "migration/misc.h"
> #include "standard-headers/linux/ethtool.h"
> +#include "standard-headers/linux/libbpf.h"
>
> #define VIRTIO_NET_VM_VERSION 11
>
> @@ -1329,6 +1330,9 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q)
> VirtQueueElement *elem;
> int32_t num_packets = 0;
> int queue_index = vq2q(virtio_get_queue_index(q->tx_vq));
> +
> + struct bpf_object *obj = NULL;
> + bpf_object__load(obj);
This really doesn't tell us anything useful about how this will be
used and integrated in qemu. I'd expect this patch to actually
be doing a real feature complete impl of RSS for virtio-net.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-06-25 11:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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é [this message]
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
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=20180625112204.GH18580@redhat.com \
--to=berrange@redhat.com \
--cc=ailan@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sameeh@daynix.com \
--cc=yan@daynix.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).