rawdev: add private data size to info query
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 10 Sep 2020 14:36:03 +0000 (15:36 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 11 Sep 2020 09:50:53 +0000 (11:50 +0200)
commit10b71caecbe1cddcbb65c050ca775fba575e88db
tree159955332ddd45dcf92f1e8dfb14788956af570d
parent2dceae68f94ccad219ec24ef7c6bbbc13c14a9a3
rawdev: add private data size to info query

Currently with the rawdev API there is no way to check that the structure
passed in via the dev_private pointer in the dev_info structure 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: Rosen Xu <rosen.xu@intel.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
16 files changed:
app/test/test_rawdev.c
doc/guides/rawdevs/ioat.rst
doc/guides/rel_notes/release_20_11.rst
doc/guides/sample_app_ug/ioat.rst
drivers/bus/ifpga/ifpga_bus.c
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/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