All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugenio Perez Martin <eperezma@redhat.com>
To: Hawkins Jiawei <yin31149@gmail.com>
Cc: jasowang@redhat.com, mst@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 4/6] virtio-net: expose virtio_net_supported_guest_offloads()
Date: Thu, 1 Jun 2023 15:43:38 +0200	[thread overview]
Message-ID: <CAJaqyWewHKZebftQc6HrhDQEV5cTWiJUkVL4NgzOVqoGdP+6Sw@mail.gmail.com> (raw)
In-Reply-To: <CAKrof1OyEL5RGTWgHjgfMSkMC-afiWW8VAF5qirCy3juErWSqA@mail.gmail.com>

On Thu, Jun 1, 2023 at 11:05 AM Hawkins Jiawei <yin31149@gmail.com> wrote:
>
> On Thu, 1 Jun 2023 at 16:48, Hawkins Jiawei <yin31149@gmail.com> wrote:
> >
> > To support restoring offloads state in vdpa, need to expose
> > the function virtio_net_supported_guest_offloads(), then vdpa
> > uses this function to get the guest supported offloads.
>
> Here it should be changed to "then QEMU uses this function
> to get the guest supported offloads.". I will correct the commit
> message in the v3 patch.
>

Maybe "to get the device supported offloads allow qemu to know the
defaults, so it can skip the control message sending if they match
with the driver's configuration"?

We can also add "This will be the default at guest's startup, these
values can mismatch only at live migration".

What do you think?

Thanks!

> Thanks!
>
> >
> > Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
> > ---
> >  hw/net/virtio-net.c            | 2 +-
> >  include/hw/virtio/virtio-net.h | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> > index 7b27dad6c4..7e8897a8bc 100644
> > --- a/hw/net/virtio-net.c
> > +++ b/hw/net/virtio-net.c
> > @@ -874,7 +874,7 @@ static uint64_t virtio_net_guest_offloads_by_features(uint32_t features)
> >      return guest_offloads_mask & features;
> >  }
> >
> > -static inline uint64_t virtio_net_supported_guest_offloads(const VirtIONet *n)
> > +uint64_t virtio_net_supported_guest_offloads(const VirtIONet *n)
> >  {
> >      VirtIODevice *vdev = VIRTIO_DEVICE(n);
> >      return virtio_net_guest_offloads_by_features(vdev->guest_features);
> > diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
> > index ef234ffe7e..5f5dcb4572 100644
> > --- a/include/hw/virtio/virtio-net.h
> > +++ b/include/hw/virtio/virtio-net.h
> > @@ -227,5 +227,6 @@ size_t virtio_net_handle_ctrl_iov(VirtIODevice *vdev,
> >                                    unsigned out_num);
> >  void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
> >                                     const char *type);
> > +uint64_t virtio_net_supported_guest_offloads(const VirtIONet *n);
> >
> >  #endif
> > --
> > 2.25.1
> >
>



  reply	other threads:[~2023-06-01 13:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  8:28 [PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support Hawkins Jiawei
2023-06-01  8:48 ` [PATCH v2 1/6] include/hw/virtio: make some VirtIODevice const Hawkins Jiawei
2023-06-01  8:48 ` [PATCH v2 2/6] vdpa: reuse virtio_vdev_has_feature() Hawkins Jiawei
2023-06-01  8:48 ` [PATCH v2 3/6] hw/net/virtio-net: make some VirtIONet const Hawkins Jiawei
2023-06-01  8:48 ` [PATCH v2 4/6] virtio-net: expose virtio_net_supported_guest_offloads() Hawkins Jiawei
2023-06-01  9:05   ` Hawkins Jiawei
2023-06-01 13:43     ` Eugenio Perez Martin [this message]
2023-06-01 13:58       ` Hawkins Jiawei
2023-06-01 14:37         ` Eugenio Perez Martin
2023-06-01  8:48 ` [PATCH v2 5/6] vdpa: Add vhost_vdpa_net_load_offloads() Hawkins Jiawei
2023-06-01  8:48 ` [PATCH v2 6/6] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ Hawkins Jiawei
2023-06-01  9:56 ` [PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support Lei Yang
2023-06-01 13:41   ` Hawkins Jiawei

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=CAJaqyWewHKZebftQc6HrhDQEV5cTWiJUkVL4NgzOVqoGdP+6Sw@mail.gmail.com \
    --to=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yin31149@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.