qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yuri Benditovich <yuri.benditovich@daynix.com>
To: Jason Wang <jasowang@redhat.com>
Cc: "Yan Vugenfirer" <yan@daynix.com>,
	"Andrew Melnychenko" <andrew@daynix.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.
Date: Sun, 24 Jan 2021 13:33:42 +0200	[thread overview]
Message-ID: <CAOEp5OfmBszqk9mB5qcyBvX4JViZQoEeh1tWfkGktkaZ+kgrug@mail.gmail.com> (raw)
In-Reply-To: <CAOEp5Oc265Z7+yipfuGSFcVY_tt5oqyf4pkk1jjyxyVTNoCkmQ@mail.gmail.com>

On Sun, Jan 24, 2021 at 10:24 AM Yuri Benditovich
<yuri.benditovich@daynix.com> wrote:
>
> Hi Jason,
>
> I've prepared a POC of graceful switch to 'vhost off' if respective
> features are acked by the guest.
> Such a way we do not need to silently clear RSS and hash report
> features in case of 'vhost on'.
> Can you please review it and provide your feedback?
>
> I think the only open question is what to do with cases of vhost-user
> and vhost-vdpa.
>
> https://github.com/qemu/qemu/pull/105
> This pull request is for reviews only.

Unfortunately qemu github PR is closed for comments
This is the link to the same on Daynix repository

https://github.com/daynix/qemu/pull/1

>
> Thanks in advance
>
>
>
>
>
>
> On Mon, Jan 18, 2021 at 5:16 AM Jason Wang <jasowang@redhat.com> wrote:
> >
> >
> > On 2021/1/17 下午5:04, Yuri Benditovich wrote:
> > > On Fri, Jan 15, 2021 at 9:20 AM Jason Wang<jasowang@redhat.com>  wrote:
> > >> On 2021/1/15 上午5:16, Andrew Melnychenko wrote:
> > >>> From: Andrew<andrew@daynix.com>
> > >>>
> > >>> When RSS is enabled the device tries to load the eBPF program
> > >>> to select RX virtqueue in the TUN. If eBPF can be loaded
> > >>> the RSS will function also with vhost (works with kernel 5.8 and later).
> > >>> Software RSS is used as a fallback with vhost=off when eBPF can't be loaded
> > >>> or when hash population requested by the guest.
> > >>>
> > >>> Signed-off-by: Yuri Benditovich<yuri.benditovich@daynix.com>
> > >>> Signed-off-by: Andrew Melnychenko<andrew@daynix.com>
> > >>> ---
> > >>>    hw/net/vhost_net.c             |   2 +
> > >>>    hw/net/virtio-net.c            | 125 +++++++++++++++++++++++++++++++--
> > >>>    include/hw/virtio/virtio-net.h |   4 ++
> > >>>    net/vhost-vdpa.c               |   2 +
> > >>>    4 files changed, 129 insertions(+), 4 deletions(-)
> > >>>
> > >>> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> > >>> index 24d555e764..16124f99c3 100644
> > >>> --- a/hw/net/vhost_net.c
> > >>> +++ b/hw/net/vhost_net.c
> > >>> @@ -71,6 +71,8 @@ static const int user_feature_bits[] = {
> > >>>        VIRTIO_NET_F_MTU,
> > >>>        VIRTIO_F_IOMMU_PLATFORM,
> > >>>        VIRTIO_F_RING_PACKED,
> > >>> +    VIRTIO_NET_F_RSS,
> > >>> +    VIRTIO_NET_F_HASH_REPORT,
> > >>>
> > >>>        /* This bit implies RARP isn't sent by QEMU out of band */
> > >>>        VIRTIO_NET_F_GUEST_ANNOUNCE,
> > >>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> > >>> index 09ceb02c9d..37016fc73a 100644
> > >>> --- a/hw/net/virtio-net.c
> > >>> +++ b/hw/net/virtio-net.c
> > >>> @@ -691,6 +691,19 @@ static void virtio_net_set_queues(VirtIONet *n)
> > >>>
> > >>>    static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue);
> > >>>
> > >>> +static uint64_t fix_ebpf_vhost_features(uint64_t features)
> > >>> +{
> > >>> +    /* If vhost=on & CONFIG_EBPF doesn't set - disable RSS feature */
> > >> I still think we should not clear feature silently. This may break
> > >> migraiton if the feature is cleared on destination.
> > > Do I understand it correctly that if we do not clear features silently
> > > and implement a graceful drop to vhost=off when we can't do what we
> > > need with vhost - then we do not need to add any migration blocker?
> >
> >
> > Yes. I think we won't go with migration blocker since we need support
> > migration in the end.
> >
> > Thanks
> >
> >
> > >
> >


  reply	other threads:[~2021-01-24 11:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 21:16 [RFC PATCH v3 0/6] eBPF RSS support for virtio-net Andrew Melnychenko
2021-01-14 20:54 ` no-reply
2021-01-14 21:16 ` [RFC PATCH v3 1/6] net/tap: Added TUNSETSTEERINGEBPF code Andrew Melnychenko
2021-01-14 21:16 ` [RFC PATCH v3 2/6] net: Added SetSteeringEBPF method for NetClientState Andrew Melnychenko
2021-01-14 21:16 ` [RFC PATCH v3 3/6] ebpf: Added eBPF RSS program Andrew Melnychenko
2021-01-14 21:16 ` [RFC PATCH v3 4/6] ebpf: Added eBPF RSS loader Andrew Melnychenko
2021-01-15  7:02   ` Jason Wang
2021-01-19 14:53     ` Yuri Benditovich
2021-01-25  9:02       ` Jason Wang
2021-01-25 10:52         ` Yuri Benditovich
2021-01-14 21:16 ` [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net Andrew Melnychenko
2021-01-15  7:20   ` Jason Wang
2021-01-17  9:04     ` Yuri Benditovich
2021-01-18  3:16       ` Jason Wang
2021-01-24  8:24         ` Yuri Benditovich
2021-01-24 11:33           ` Yuri Benditovich [this message]
2021-01-25  8:59           ` Jason Wang
2021-01-14 21:16 ` [RFC PATCH v3 6/6] docs: Added eBPF documentation Andrew Melnychenko
2021-01-15  7:24   ` Jason Wang
2021-01-15  7:27 ` [RFC PATCH v3 0/6] eBPF RSS support for virtio-net Jason Wang

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=CAOEp5OfmBszqk9mB5qcyBvX4JViZQoEeh1tWfkGktkaZ+kgrug@mail.gmail.com \
    --to=yuri.benditovich@daynix.com \
    --cc=andrew@daynix.com \
    --cc=berrange@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).