[dpdk-dev] [PATCH v2 3/7] rawdev: add private data length parameter to config fn
Bruce Richardson
bruce.richardson at intel.com
Fri Sep 4 16:16:42 CEST 2020
On Thu, Aug 13, 2020 at 12:28:01PM +0100, Bruce Richardson wrote:
> Currently with the rawdev API there is no way to check that the structure
> passed in via the dev_private pointer in the structure passed to configure
> API is of the correct type - it's just checked that it is non-NULL. Adding
> in the length of the expected structure provides a measure of typechecking,
> and can also be used for ABI compatibility in future, since ABI changes
> involving structs almost always involve a change in size.
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Reviewed-by: Rosen Xu <rosen.xu at intel.com>
> ---
> doc/guides/rawdevs/ioat.rst | 2 +-
> doc/guides/rawdevs/octeontx2_dma.rst | 2 +-
> doc/guides/rawdevs/octeontx2_ep.rst | 3 ++-
> doc/guides/sample_app_ug/ioat.rst | 2 +-
> drivers/raw/ifpga/ifpga_rawdev.c | 3 ++-
> drivers/raw/ioat/ioat_rawdev.c | 5 +++--
> drivers/raw/ioat/ioat_rawdev_test.c | 2 +-
> drivers/raw/ntb/ntb.c | 6 +++++-
> drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 7 ++++---
> drivers/raw/octeontx2_dma/otx2_dpi_test.c | 3 ++-
> drivers/raw/octeontx2_ep/otx2_ep_rawdev.c | 7 ++++---
> drivers/raw/octeontx2_ep/otx2_ep_test.c | 2 +-
> drivers/raw/skeleton/skeleton_rawdev.c | 5 +++--
> drivers/raw/skeleton/skeleton_rawdev_test.c | 5 +++--
> examples/ioat/ioatfwd.c | 2 +-
> examples/ntb/ntb_fwd.c | 2 +-
> lib/librte_rawdev/rte_rawdev.c | 6 ++++--
> lib/librte_rawdev/rte_rawdev.h | 8 +++++++-
> lib/librte_rawdev/rte_rawdev_pmd.h | 3 ++-
> 19 files changed, 48 insertions(+), 27 deletions(-)
>
<snip>
> diff --git a/lib/librte_rawdev/rte_rawdev.h b/lib/librte_rawdev/rte_rawdev.h
> index cf6acfd261..73e3bd5aea 100644
> --- a/lib/librte_rawdev/rte_rawdev.h
> +++ b/lib/librte_rawdev/rte_rawdev.h
> @@ -116,13 +116,19 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info,
> * driver/implementation can use to configure the device. It is also assumed
> * that once the configuration is done, a `queue_id` type field can be used
> * to refer to some arbitrary internal representation of a queue.
> + * @dev_private_size
Small mistake here I just spotted. This should be "@param dev_private_size",
otherwise we get doc build warnings. Will fix in V3 if one is needed,
otherwise I'd ask that this just be fixed on apply.
Thanks,
/Bruce
More information about the dev
mailing list