All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eli Cohen <elic@nvidia.com>
Cc: lvivier@redhat.com, virtualization@lists.linux-foundation.org,
	stephen@networkplumber.org, eperezma@redhat.com,
	Edward Cree <ecree@solarflare.com>,
	si-wei.liu@oracle.com
Subject: Re: [PATCH] virtio: Add definition for VIRTIO_F_NOTIFICATION_DATA feature flag
Date: Thu, 17 Feb 2022 06:49:43 -0500	[thread overview]
Message-ID: <20220217064512-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220217095545.195426-1-elic@nvidia.com>

On Thu, Feb 17, 2022 at 11:55:45AM +0200, Eli Cohen wrote:
> This is required by iproute2 to display the capabilities of a vdpa based
> virtio device.
> 
> Previously, drivers/net/ethernet/sfc/mcdi_pcol.h made use of a private
> definition of this flag. Modify the definition to rely on the new
> generic definition.
> 
> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
>  drivers/net/ethernet/sfc/mcdi_pcol.h | 2 +-
>  include/uapi/linux/virtio_config.h   | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sfc/mcdi_pcol.h b/drivers/net/ethernet/sfc/mcdi_pcol.h
> index d3fcbf930dba..2603e04dae06 100644
> --- a/drivers/net/ethernet/sfc/mcdi_pcol.h
> +++ b/drivers/net/ethernet/sfc/mcdi_pcol.h
> @@ -21477,7 +21477,7 @@
>  #define        VIRTIO_BLK_CONFIG_VIRTIO_F_SR_IOV_LBN 37
>  #define        VIRTIO_BLK_CONFIG_VIRTIO_F_SR_IOV_WIDTH 1
>  #define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_OFST 0
> -#define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_LBN 38
> +#define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_LBN VIRTIO_F_NOTIFICATION_DATA
>  #define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_WIDTH 1
>  #define       VIRTIO_BLK_CONFIG_FEATURES_LBN 0
>  #define       VIRTIO_BLK_CONFIG_FEATURES_WIDTH 64

I don't think we need to bother with macros in mcdi_pcol.h - that header
is generated by some kind of script, this probably is why it has
all these macros that are otherwise unused.

Cc Edward Cree who added them - Edward, is there a way to
get rid of VIRTIO_ macros inmcdi_pcol.h?

> diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
> index b5eda06f0d57..30eb76dcdcad 100644
> --- a/include/uapi/linux/virtio_config.h
> +++ b/include/uapi/linux/virtio_config.h
> @@ -92,4 +92,10 @@
>   * Does the device support Single Root I/O Virtualization?
>   */
>  #define VIRTIO_F_SR_IOV			37
> +
> +/* When negotiated, indicates that the driver can pass extra data beyond
> + * virtqueue identification when sending notifications
> + */
> +#define VIRTIO_F_NOTIFICATION_DATA	38
> +
>  #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
> -- 
> 2.32.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2022-02-17 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220217095545.195426-1-elic@nvidia.com>
2022-02-17 10:55 ` [PATCH] virtio: Add definition for VIRTIO_F_NOTIFICATION_DATA feature flag Stefano Garzarella
2022-02-17 11:49 ` Michael S. Tsirkin [this message]
     [not found]   ` <b52aebae-44c8-fb4a-f7f3-6da7cd4075fc@xilinx.com>
2022-02-17 21:45     ` 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=20220217064512-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ecree@solarflare.com \
    --cc=elic@nvidia.com \
    --cc=eperezma@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=si-wei.liu@oracle.com \
    --cc=stephen@networkplumber.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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.