[dpdk-dev] [PATCH v4 6/9] raw/ioat: add device info function
Hu, Jiayu
jiayu.hu at intel.com
Tue Jul 2 04:33:25 CEST 2019
> -----Original Message-----
> From: Richardson, Bruce
> Sent: Monday, July 1, 2019 11:56 PM
> To: dev at dpdk.org
> Cc: thomas at monjalon.net; jerinj at marvell.com; Hu, Jiayu
> <jiayu.hu at intel.com>; Richardson, Bruce <bruce.richardson at intel.com>;
> Van Haaren, Harry <harry.van.haaren at intel.com>
> Subject: [PATCH v4 6/9] raw/ioat: add device info function
>
> Add in the "info_get" function to the driver, to allow us to query the
> device. This allows us to have the unit test pick up the presence of
> supported hardware or not.
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Tested-by: Harry van Haaren <harry.van.haaren at intel.com>
> ---
> V4: Use TEST_SUCCESS in place of 0, when returning from test case.
> Minor documentation updates.
>
> V2: Test case is placed in driver self-test routine
> ---
> app/test/test_rawdev.c | 11 ++++++++++
> doc/guides/rawdevs/ioat_rawdev.rst | 34
> ++++++++++++++++++++++++++++++
> drivers/raw/ioat/ioat_rawdev.c | 11 ++++++++++
> drivers/raw/ioat/rte_ioat_rawdev.h | 11 ++++++++++
> 4 files changed, 67 insertions(+)
>
> diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
> index 86b5b2a77..2bfe2544d 100644
> --- a/drivers/raw/ioat/ioat_rawdev.c
> +++ b/drivers/raw/ioat/ioat_rawdev.c
> @@ -34,10 +34,21 @@ static struct rte_pci_driver ioat_pmd_drv;
> #define IOAT_PMD_ERR(fmt, args...) IOAT_PMD_LOG(ERR, fmt, ## args)
> #define IOAT_PMD_WARN(fmt, args...) IOAT_PMD_LOG(WARNING, fmt, ##
> args)
>
> +static void
> +ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info)
> +{
> + struct rte_ioat_rawdev_config *cfg = dev_info;
> + struct rte_ioat_rawdev *ioat = dev->dev_private;
> +
> + if (cfg != NULL)
> + cfg->ring_size = ioat->ring_size;
> +}
The CBDMA user may want to know the maximum copy length that the device
supports and the NUMA location of the device. So can ioat_dev_info_get()
return more device information?
Thanks,
Jiayu
More information about the dev
mailing list