qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/16] vhost-net: vq reset feature bit support


From: Jason Wang
Subject: Re: [PATCH 16/16] vhost-net: vq reset feature bit support
Date: Wed, 27 Jul 2022 12:53:22 +0800

On Tue, Jul 26, 2022 at 2:24 PM Kangjie Xu <kangjie.xu@linux.alibaba.com> wrote:
>
>
> 在 2022/7/26 12:28, Jason Wang 写道:
> >
> > 在 2022/7/18 19:17, Kangjie Xu 写道:
> >> Add support for negotation of vq reset feature bit.
> >>
> >> Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
> >> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> >
> >
> > I'd suggest to add support for vhost-net kernel as well. It looks much
> > more easier than vhost-user (I guess a stop/start would do the trick).
> >
> > Thanks
> >
> >
> Yeah, we've planned to support it in the future.

If it's possible, I suggest to implement in this series. It would be
easier since it current kernel support it already (via SET_BACKEND).

Thanks

>
> Thanks
>
> >> ---
> >>   hw/net/vhost_net.c  | 1 +
> >>   hw/net/virtio-net.c | 3 ++-
> >>   2 files changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> >> index 4f5f034c11..de910f6466 100644
> >> --- a/hw/net/vhost_net.c
> >> +++ b/hw/net/vhost_net.c
> >> @@ -73,6 +73,7 @@ static const int user_feature_bits[] = {
> >>       VIRTIO_NET_F_MTU,
> >>       VIRTIO_F_IOMMU_PLATFORM,
> >>       VIRTIO_F_RING_PACKED,
> >> +    VIRTIO_F_RING_RESET,
> >>       VIRTIO_NET_F_RSS,
> >>       VIRTIO_NET_F_HASH_REPORT,
> >>   diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> >> index 0747ffe71c..a8b299067a 100644
> >> --- a/hw/net/virtio-net.c
> >> +++ b/hw/net/virtio-net.c
> >> @@ -757,6 +757,8 @@ static uint64_t
> >> virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
> >>         virtio_add_feature(&features, VIRTIO_NET_F_MAC);
> >>   +    virtio_add_feature(&features, VIRTIO_F_RING_RESET);
> >> +
> >>       if (!peer_has_vnet_hdr(n)) {
> >>           virtio_clear_feature(&features, VIRTIO_NET_F_CSUM);
> >>           virtio_clear_feature(&features, VIRTIO_NET_F_HOST_TSO4);
> >> @@ -777,7 +779,6 @@ static uint64_t
> >> virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
> >>       }
> >>         if (!get_vhost_net(nc->peer)) {
> >> -        virtio_add_feature(&features, VIRTIO_F_RING_RESET);
> >>           return features;
> >>       }
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]