qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Srujana Challa <schalla@marvell.com>
Cc: qemu-devel@nongnu.org, vattunuru@marvell.com, jerinj@marvell.com,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH] vhost_net: add NOTIFICATION_DATA and IN_ORDER feature bits to vdpa_feature_bits
Date: Mon, 19 Feb 2024 04:45:10 -0500	[thread overview]
Message-ID: <20240219044352-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240102111432.36817-1-schalla@marvell.com>

On Tue, Jan 02, 2024 at 04:44:32PM +0530, Srujana Challa wrote:
> Enables VIRTIO_F_NOTIFICATION_DATA and VIRTIO_F_IN_ORDER feature bits
> for vhost vdpa backend. Also adds code to consider all feature bits
> supported by vhost net client type for feature negotiation, so that
> vhost backend device supported features can be negotiated with guest.
> 
> Signed-off-by: Srujana Challa <schalla@marvell.com>
> ---
>  hw/net/vhost_net.c | 10 ++++++++++
>  net/vhost-vdpa.c   |  2 ++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> index e8e1661646..65ae8bcece 100644
> --- a/hw/net/vhost_net.c
> +++ b/hw/net/vhost_net.c
> @@ -117,6 +117,16 @@ static const int *vhost_net_get_feature_bits(struct vhost_net *net)
>  
>  uint64_t vhost_net_get_features(struct vhost_net *net, uint64_t features)
>  {
> +    const int *bit = vhost_net_get_feature_bits(net);
> +
> +    /*
> +     * Consider all feature bits for feature negotiation with vhost backend,
> +     * so that all backend device supported features can be negotiated.
> +     */
> +    while (*bit != VHOST_INVALID_FEATURE_BIT) {
> +        features |= (1ULL << *bit);
> +        bit++;
> +    }
>      return vhost_get_features(&net->dev, vhost_net_get_feature_bits(net),
>              features);
>  }

I don't think we should do this part. With vdpa QEMU is in control of
which features are exposed and that is intentional since features are
often tied to other behaviour.

> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> index 3726ee5d67..51334fcfe2 100644
> --- a/net/vhost-vdpa.c
> +++ b/net/vhost-vdpa.c
> @@ -57,7 +57,9 @@ typedef struct VhostVDPAState {
>   */
>  const int vdpa_feature_bits[] = {
>      VIRTIO_F_ANY_LAYOUT,
> +    VIRTIO_F_IN_ORDER,
>      VIRTIO_F_IOMMU_PLATFORM,
> +    VIRTIO_F_NOTIFICATION_DATA,
>      VIRTIO_F_NOTIFY_ON_EMPTY,
>      VIRTIO_F_RING_PACKED,
>      VIRTIO_F_RING_RESET,
> -- 
> 2.25.1



  parent reply	other threads:[~2024-02-19  9:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 11:14 [PATCH] vhost_net: add NOTIFICATION_DATA and IN_ORDER feature bits to vdpa_feature_bits Srujana Challa
2024-01-31  7:10 ` Vamsi Krishna Attunuru
2024-02-19  9:38   ` Srujana Challa
2024-02-19  9:46     ` Michael S. Tsirkin
2024-02-19  9:45 ` Michael S. Tsirkin [this message]
2024-02-19 11:43   ` [EXT] " Srujana Challa
2024-02-22  7:23     ` Srujana Challa
2024-03-08 13:37       ` Srujana Challa
2024-03-11  8:32         ` Eugenio Perez Martin
2024-03-12 15:51           ` Michael S. Tsirkin

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=20240219044352-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jerinj@marvell.com \
    --cc=qemu-devel@nongnu.org \
    --cc=schalla@marvell.com \
    --cc=vattunuru@marvell.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).