This patchset proposes some internal and externally-visible changes to the rawdev API. If consensus is in favour, I will submit a deprecation notice for the changes for the 20.08 release, so that these ABI/API-breaking changes can be merged in 20.11
The changes are in two areas: * For any APIs which take a void * parameter for driver-specific structs, add an additional parameter to provide the struct length. This allows some runtime type-checking, as well as possible ABI-compatibility support in the future as structure change generally involve a change in the size of the structure. * Ensure all APIs which can return error values have int type, rather than void. Since functions like info_get and queue_default_get can now do some typechecking, they need to be modified to allow them to return error codes on failure. Bruce Richardson (5): rawdev: add private data length parameter to info fn rawdev: allow drivers to return error from info function rawdev: add private data length parameter to config fn rawdev: add private data length parameter to queue fns rawdev: allow queue default config query to return error drivers/bus/ifpga/ifpga_bus.c | 2 +- drivers/raw/ifpga/ifpga_rawdev.c | 23 +++++----- drivers/raw/ioat/ioat_rawdev.c | 17 ++++--- drivers/raw/ioat/ioat_rawdev_test.c | 6 +-- drivers/raw/ntb/ntb.c | 49 ++++++++++++++++----- 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 | 34 ++++++++------ drivers/raw/skeleton/skeleton_rawdev_test.c | 32 ++++++++------ examples/ioat/ioatfwd.c | 4 +- examples/ntb/ntb_fwd.c | 7 +-- lib/librte_rawdev/rte_rawdev.c | 27 +++++++----- lib/librte_rawdev/rte_rawdev.h | 27 ++++++++++-- lib/librte_rawdev/rte_rawdev_pmd.h | 22 ++++++--- 16 files changed, 178 insertions(+), 91 deletions(-) -- 2.25.1