virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v4 0/4] vdpa tool enhancements
       [not found] <20220302065444.138615-1-elic@nvidia.com>
@ 2022-03-09  8:07 ` Jason Wang
       [not found] ` <20220302065444.138615-4-elic@nvidia.com>
       [not found] ` <20220302065444.138615-2-elic@nvidia.com>
  2 siblings, 0 replies; 3+ messages in thread
From: Jason Wang @ 2022-03-09  8:07 UTC (permalink / raw)
  To: Eli Cohen, stephen, netdev, virtualization, dsahern; +Cc: si-wei.liu, lulu, mst


在 2022/3/2 下午2:54, Eli Cohen 写道:
> Hi Stephen,
>
> this is a resend of v3 which omitted you and netdev from the recepient
> list. I added a few "acked-by" and called it v4.
>
> The following four patch series enhances vdpa to show negotiated
> features for a vdpa device, max features for a management device and
> allows to configure max number of virtqueue pairs.
>
> v3->v4:
> Resend the patches with added "Acked-by" to the right mailing list.


Hello maintainers:

Any comment on the series? We want to have this for the next RHEL release.

Thanks


>
> Eli Cohen (4):
>    vdpa: Remove unsupported command line option
>    vdpa: Allow for printing negotiated features of a device
>    vdpa: Support for configuring max VQ pairs for a device
>    vdpa: Support reading device features
>
>   vdpa/include/uapi/linux/vdpa.h |   4 +
>   vdpa/vdpa.c                    | 151 +++++++++++++++++++++++++++++++--
>   2 files changed, 148 insertions(+), 7 deletions(-)
>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v4 3/4] vdpa: Support for configuring max VQ pairs for a device
       [not found] ` <20220302065444.138615-4-elic@nvidia.com>
@ 2022-03-09  8:58   ` Parav Pandit via Virtualization
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit via Virtualization @ 2022-03-09  8:58 UTC (permalink / raw)
  To: Eli Cohen, stephen@networkplumber.org, netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org
  Cc: si-wei.liu@oracle.com, lulu@redhat.com, mst@redhat.com


> From: Eli Cohen <elic@nvidia.com>
> Sent: Wednesday, March 2, 2022 12:25 PM
> --- a/vdpa/include/uapi/linux/vdpa.h
> +++ b/vdpa/include/uapi/linux/vdpa.h
> @@ -41,6 +41,7 @@ enum vdpa_attr {
>  	VDPA_ATTR_DEV_NET_CFG_MTU,		/* u16 */
> 
>  	VDPA_ATTR_DEV_NEGOTIATED_FEATURES,	/* u64 */
> +	VDPA_ATTR_DEV_MGMTDEV_MAX_VQS,          /* u32 */
> 
Its u32 here, but in the code below at places, it is mix of u16 and u32.
Please make it consistent to be u32 or u16 to match to kernel at all places.
 
>  	/* new attributes must be added above here */
>  	VDPA_ATTR_MAX,
> diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
> index 5f1aa91a4b96..22064c755baa 100644
> --- a/vdpa/vdpa.c
> +++ b/vdpa/vdpa.c
> @@ -25,6 +25,7 @@
>  #define VDPA_OPT_VDEV_HANDLE		BIT(3)
>  #define VDPA_OPT_VDEV_MAC		BIT(4)
>  #define VDPA_OPT_VDEV_MTU		BIT(5)
> +#define VDPA_OPT_MAX_VQP		BIT(6)
> 
>  struct vdpa_opts {
>  	uint64_t present; /* flags of present items */ @@ -34,6 +35,7 @@
> struct vdpa_opts {
>  	unsigned int device_id;
>  	char mac[ETH_ALEN];
>  	uint16_t mtu;
> +	uint16_t max_vqp;
>  };
> 
u16 here.

>  struct vdpa {
> @@ -81,6 +83,7 @@ static const enum mnl_attr_data_type
> vdpa_policy[VDPA_ATTR_MAX + 1] = {
>  	[VDPA_ATTR_DEV_MAX_VQS] = MNL_TYPE_U32,
>  	[VDPA_ATTR_DEV_MAX_VQ_SIZE] = MNL_TYPE_U16,
>  	[VDPA_ATTR_DEV_NEGOTIATED_FEATURES] = MNL_TYPE_U64,
> +	[VDPA_ATTR_DEV_MGMTDEV_MAX_VQS] = MNL_TYPE_U32,
>  };
u32 here, but code is doing u16.

> 
>  static int attr_cb(const struct nlattr *attr, void *data) @@ -222,6 +225,8 @@
> static void vdpa_opts_put(struct nlmsghdr *nlh, struct vdpa *vdpa)
>  			     sizeof(opts->mac), opts->mac);
>  	if (opts->present & VDPA_OPT_VDEV_MTU)
>  		mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MTU, opts-
> >mtu);
> +	if (opts->present & VDPA_OPT_MAX_VQP)
> +		mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MAX_VQP,
> opts->max_vqp);
>  }
> 
u16 here.

>  static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv, @@ -
> 290,6 +295,14 @@ static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char
> **argv,
> 
>  			NEXT_ARG_FWD();
>  			o_found |= VDPA_OPT_VDEV_MTU;
> +		} else if ((matches(*argv, "max_vqp")  == 0) && (o_optional &
> VDPA_OPT_MAX_VQP)) {
> +			NEXT_ARG_FWD();
> +			err = vdpa_argv_u16(vdpa, argc, argv, &opts-
> >max_vqp);
> +			if (err)
> +				return err;
> +
> +			NEXT_ARG_FWD();
> +			o_found |= VDPA_OPT_MAX_VQP;
>  		} else {
>  			fprintf(stderr, "Unknown option \"%s\"\n", *argv);
>  			return -EINVAL;
> @@ -501,6 +514,15 @@ static void pr_out_mgmtdev_show(struct vdpa *vdpa,
> const struct nlmsghdr *nlh,
>  		pr_out_array_end(vdpa);
>  	}
> 
> +	if (tb[VDPA_ATTR_DEV_MGMTDEV_MAX_VQS]) {
> +		uint16_t num_vqs;
> +
> +		if (!vdpa->json_output)
> +			printf("\n");
> +		num_vqs =
> mnl_attr_get_u16(tb[VDPA_ATTR_DEV_MGMTDEV_MAX_VQS]);
> +		print_uint(PRINT_ANY, "max_supported_vqs", "
> max_supported_vqs %d", num_vqs);
> +	}
> +
>  	pr_out_handle_end(vdpa);
>  }
> 
> @@ -560,7 +582,7 @@ static int cmd_mgmtdev(struct vdpa *vdpa, int argc,
> char **argv)  static void cmd_dev_help(void)  {
>  	fprintf(stderr, "Usage: vdpa dev show [ DEV ]\n");
> -	fprintf(stderr, "       vdpa dev add name NAME mgmtdev
> MANAGEMENTDEV [ mac MACADDR ] [ mtu MTU ]\n");
> +	fprintf(stderr, "       vdpa dev add name NAME mgmtdev
> MANAGEMENTDEV [ mac MACADDR ] [ mtu MTU ] [max_vqp
> MAX_VQ_PAIRS]\n");
>  	fprintf(stderr, "       vdpa dev del DEV\n");
>  	fprintf(stderr, "Usage: vdpa dev config COMMAND [ OPTIONS ]\n");  }
> @@ -650,7 +672,8 @@ static int cmd_dev_add(struct vdpa *vdpa, int argc,
> char **argv)
>  					  NLM_F_REQUEST | NLM_F_ACK);
>  	err = vdpa_argv_parse_put(nlh, vdpa, argc, argv,
>  				  VDPA_OPT_VDEV_MGMTDEV_HANDLE |
> VDPA_OPT_VDEV_NAME,
> -				  VDPA_OPT_VDEV_MAC |
> VDPA_OPT_VDEV_MTU);
> +				  VDPA_OPT_VDEV_MAC |
> VDPA_OPT_VDEV_MTU |
> +				  VDPA_OPT_MAX_VQP);
>  	if (err)
>  		return err;
> 
> --
> 2.35.1

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v4 1/4] vdpa: Remove unsupported command line option
       [not found] ` <20220302065444.138615-2-elic@nvidia.com>
@ 2022-03-09  8:59   ` Parav Pandit via Virtualization
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit via Virtualization @ 2022-03-09  8:59 UTC (permalink / raw)
  To: Eli Cohen, stephen@networkplumber.org, netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org
  Cc: si-wei.liu@oracle.com, Jianbo Liu, lulu@redhat.com,
	mst@redhat.com



> From: Eli Cohen <elic@nvidia.com>
> Sent: Wednesday, March 2, 2022 12:25 PM
> 
> "-v[erbose]" option is not supported.
> Remove it.
> 
> Reviewed-by: Jianbo Liu <jianbol@mellanox.com>
> Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
> Acked-by: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
>  vdpa/vdpa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
> index f048e470c929..4ccb564872a0 100644
> --- a/vdpa/vdpa.c
> +++ b/vdpa/vdpa.c
> @@ -711,7 +711,7 @@ static void help(void)
>  	fprintf(stderr,
>  		"Usage: vdpa [ OPTIONS ] OBJECT { COMMAND | help }\n"
>  		"where  OBJECT := { mgmtdev | dev }\n"
> -		"       OPTIONS := { -V[ersion] | -n[o-nice-names] | -j[son] | -
> p[retty] | -v[erbose] }\n");
> +		"       OPTIONS := { -V[ersion] | -n[o-nice-names] | -j[son] | -
> p[retty] }\n");
>  }
> 
>  static int vdpa_cmd(struct vdpa *vdpa, int argc, char **argv)
> --
> 2.35.1

Reviewed-by: Parav Pandit <parav@nvidia.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-09  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220302065444.138615-1-elic@nvidia.com>
2022-03-09  8:07 ` [PATCH v4 0/4] vdpa tool enhancements Jason Wang
     [not found] ` <20220302065444.138615-4-elic@nvidia.com>
2022-03-09  8:58   ` [PATCH v4 3/4] vdpa: Support for configuring max VQ pairs for a device Parav Pandit via Virtualization
     [not found] ` <20220302065444.138615-2-elic@nvidia.com>
2022-03-09  8:59   ` [PATCH v4 1/4] vdpa: Remove unsupported command line option Parav Pandit via Virtualization

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).