rawdev: add private data size to config inputs
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 10 Sep 2020 14:36:05 +0000 (15:36 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 11 Sep 2020 09:50:55 +0000 (11:50 +0200)
commit8db9dce72d4abee4c3a66a0eb163c469bae4ad9e
treef8714a5c35918128ee1d4cd6bed82293bc9dfe2d
parentf150dd8839dd6c7a386cc98a5b0025684a31bdc1
rawdev: add private data size to config inputs

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@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
20 files changed:
doc/guides/rawdevs/ioat.rst
doc/guides/rawdevs/octeontx2_dma.rst
doc/guides/rawdevs/octeontx2_ep.rst
doc/guides/rel_notes/release_20_11.rst
doc/guides/sample_app_ug/ioat.rst
drivers/raw/ifpga/ifpga_rawdev.c
drivers/raw/ioat/ioat_rawdev.c
drivers/raw/ioat/ioat_rawdev_test.c
drivers/raw/ntb/ntb.c
drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
drivers/raw/octeontx2_dma/otx2_dpi_test.c
drivers/raw/octeontx2_ep/otx2_ep_rawdev.c
drivers/raw/octeontx2_ep/otx2_ep_test.c
drivers/raw/skeleton/skeleton_rawdev.c
drivers/raw/skeleton/skeleton_rawdev_test.c
examples/ioat/ioatfwd.c
examples/ntb/ntb_fwd.c
lib/librte_rawdev/rte_rawdev.c
lib/librte_rawdev/rte_rawdev.h
lib/librte_rawdev/rte_rawdev_pmd.h