[dpdk-dev] [PATCH v3 04/10] vdpa/sfc: get device supported max queue count
Xia, Chenbo
chenbo.xia at intel.com
Tue Nov 2 08:10:03 CET 2021
> -----Original Message-----
> From: Vijay Srivastava <vijay.srivastava at xilinx.com>
> Sent: Friday, October 29, 2021 10:47 PM
> To: dev at dpdk.org
> Cc: maxime.coquelin at redhat.com; Xia, Chenbo <chenbo.xia at intel.com>;
> andrew.rybchenko at oktetlabs.ru; Vijay Kumar Srivastava <vsrivast at xilinx.com>
> Subject: [PATCH v3 04/10] vdpa/sfc: get device supported max queue count
>
> From: Vijay Kumar Srivastava <vsrivast at xilinx.com>
>
> Implement vDPA ops get_queue_num to get the maximum number
> of queues supported by the device.
>
> Signed-off-by: Vijay Kumar Srivastava <vsrivast at xilinx.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
> drivers/vdpa/sfc/sfc_vdpa_ops.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c
> index 5750944..6c702e1 100644
> --- a/drivers/vdpa/sfc/sfc_vdpa_ops.c
> +++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c
> @@ -31,10 +31,20 @@
> static int
> sfc_vdpa_get_queue_num(struct rte_vdpa_device *vdpa_dev, uint32_t *queue_num)
> {
> - RTE_SET_USED(vdpa_dev);
> - RTE_SET_USED(queue_num);
> + struct sfc_vdpa_ops_data *ops_data;
> + void *dev;
>
> - return -1;
> + ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev);
> + if (ops_data == NULL)
> + return -1;
> +
> + dev = ops_data->dev_handle;
> + *queue_num = sfc_vdpa_adapter_by_dev_handle(dev)->max_queue_count;
> +
> + sfc_vdpa_info(dev, "vDPA ops get_queue_num :: supported queue num : %d",
> + *queue_num);
%d -> %u
With this fixed:
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
> +
> + return 0;
> }
>
> static int
> --
> 1.8.3.1
More information about the dev
mailing list