netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Shannon Nelson <shannon.nelson@amd.com>
Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org,
	brett.creeley@amd.com, netdev@vger.kernel.org,
	simon.horman@corigine.com, drivers@pensando.io
Subject: Re: [PATCH v6 virtio 04/11] pds_vdpa: move enum from common to adminq header
Date: Tue, 16 May 2023 02:12:42 -0400	[thread overview]
Message-ID: <20230516020938-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230516025521.43352-5-shannon.nelson@amd.com>

On Mon, May 15, 2023 at 07:55:14PM -0700, Shannon Nelson wrote:
> The pds_core_logical_qtype enum and IFNAMSIZ are not needed
> in the common PDS header, only needed when working with the
> adminq, so move them to the adminq header.
> 
> Note: This patch might conflict with pds_vfio patches that are
>       in review, depending on which patchset gets pulled first.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
> Acked-by: Jason Wang <jasowang@redhat.com>

It's a bit weird to add code in one patch then move it
in another. Why not start with it in the final location?

More importantly, the use of adminq terminology here
is a going to be somewhat confusing with the unrelated
admin virtqueue just having landed in the virtio spec.
Is this terminology coming from some hardware spec?

> ---
>  include/linux/pds/pds_adminq.h | 21 +++++++++++++++++++++
>  include/linux/pds/pds_common.h | 21 ---------------------
>  2 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h
> index 98a60ce87b92..61b0a8634e1a 100644
> --- a/include/linux/pds/pds_adminq.h
> +++ b/include/linux/pds/pds_adminq.h
> @@ -222,6 +222,27 @@ enum pds_core_lif_type {
>  	PDS_CORE_LIF_TYPE_DEFAULT = 0,
>  };
>  
> +#define PDS_CORE_IFNAMSIZ		16
> +
> +/**
> + * enum pds_core_logical_qtype - Logical Queue Types
> + * @PDS_CORE_QTYPE_ADMINQ:    Administrative Queue
> + * @PDS_CORE_QTYPE_NOTIFYQ:   Notify Queue
> + * @PDS_CORE_QTYPE_RXQ:       Receive Queue
> + * @PDS_CORE_QTYPE_TXQ:       Transmit Queue
> + * @PDS_CORE_QTYPE_EQ:        Event Queue
> + * @PDS_CORE_QTYPE_MAX:       Max queue type supported
> + */
> +enum pds_core_logical_qtype {
> +	PDS_CORE_QTYPE_ADMINQ  = 0,
> +	PDS_CORE_QTYPE_NOTIFYQ = 1,
> +	PDS_CORE_QTYPE_RXQ     = 2,
> +	PDS_CORE_QTYPE_TXQ     = 3,
> +	PDS_CORE_QTYPE_EQ      = 4,
> +
> +	PDS_CORE_QTYPE_MAX     = 16   /* don't change - used in struct size */
> +};
> +
>  /**
>   * union pds_core_lif_config - LIF configuration
>   * @state:	    LIF state (enum pds_core_lif_state)
> diff --git a/include/linux/pds/pds_common.h b/include/linux/pds/pds_common.h
> index 2a0d1669cfd0..435c8e8161c2 100644
> --- a/include/linux/pds/pds_common.h
> +++ b/include/linux/pds/pds_common.h
> @@ -41,27 +41,6 @@ enum pds_core_vif_types {
>  
>  #define PDS_VDPA_DEV_NAME	PDS_CORE_DRV_NAME "." PDS_DEV_TYPE_VDPA_STR
>  
> -#define PDS_CORE_IFNAMSIZ		16
> -
> -/**
> - * enum pds_core_logical_qtype - Logical Queue Types
> - * @PDS_CORE_QTYPE_ADMINQ:    Administrative Queue
> - * @PDS_CORE_QTYPE_NOTIFYQ:   Notify Queue
> - * @PDS_CORE_QTYPE_RXQ:       Receive Queue
> - * @PDS_CORE_QTYPE_TXQ:       Transmit Queue
> - * @PDS_CORE_QTYPE_EQ:        Event Queue
> - * @PDS_CORE_QTYPE_MAX:       Max queue type supported
> - */
> -enum pds_core_logical_qtype {
> -	PDS_CORE_QTYPE_ADMINQ  = 0,
> -	PDS_CORE_QTYPE_NOTIFYQ = 1,
> -	PDS_CORE_QTYPE_RXQ     = 2,
> -	PDS_CORE_QTYPE_TXQ     = 3,
> -	PDS_CORE_QTYPE_EQ      = 4,
> -
> -	PDS_CORE_QTYPE_MAX     = 16   /* don't change - used in struct size */
> -};
> -
>  int pdsc_register_notify(struct notifier_block *nb);
>  void pdsc_unregister_notify(struct notifier_block *nb);
>  void *pdsc_get_pf_struct(struct pci_dev *vf_pdev);
> -- 
> 2.17.1


  reply	other threads:[~2023-05-16  6:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  2:55 [PATCH v6 virtio 00/11] pds_vdpa driver Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 01/11] virtio: allow caller to override device id in vp_modern Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 02/11] virtio: allow caller to override device DMA mask " Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 03/11] pds_vdpa: Add new vDPA driver for AMD/Pensando DSC Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 04/11] pds_vdpa: move enum from common to adminq header Shannon Nelson
2023-05-16  6:12   ` Michael S. Tsirkin [this message]
2023-05-16 16:38     ` Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 05/11] pds_vdpa: new adminq entries Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 06/11] pds_vdpa: get vdpa management info Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 07/11] pds_vdpa: virtio bar setup for vdpa Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 08/11] pds_vdpa: add vdpa config client commands Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 09/11] pds_vdpa: add support for vdpa and vdpamgmt interfaces Shannon Nelson
2023-05-16 10:35   ` Simon Horman
2023-05-16 16:39     ` Shannon Nelson
2023-05-16  2:55 ` [PATCH v6 virtio 10/11] pds_vdpa: subscribe to the pds_core events Shannon Nelson
2023-05-16  3:30   ` Jason Wang
2023-05-16  2:55 ` [PATCH v6 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig Shannon Nelson
2023-05-16  3:29   ` Jason Wang
2023-05-17  2:24   ` kernel test robot
2023-05-17  3:56     ` Shannon Nelson

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=20230516020938-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=brett.creeley@amd.com \
    --cc=drivers@pensando.io \
    --cc=jasowang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=shannon.nelson@amd.com \
    --cc=simon.horman@corigine.com \
    --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 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).