[dpdk-dev] [RFC] ethdev: add ioctl-like API to control device specific features
Chilikin, Andrey
andrey.chilikin at intel.com
Thu Aug 3 14:21:35 CEST 2017
To control some device-specific features public device-specific functions
rte_pmd_*.h are used.
But this solution requires applications to distinguish devices at runtime
and, depending on the device type, call corresponding device-specific
functions even if functions' parameters are the same.
IOCTL-like API can be added to ethdev instead of public device-specific
functions to address the following:
* allow more usable support of features across a range of NIC from
one vendor, but not others
* allow features to be implemented by multiple NIC drivers without
relying on a critical mass to get the functionality in ethdev
* there are a large number of possible device specific functions, and
creating individual APIs for each one is not a good solution
* IOCTLs are a proven method for solving this problem in other areas,
i.e. OS kernels.
Control requests for this API will be globally defined at ethdev level, so
an application will use single API call to control different devices from
one/multiple vendors.
API call may look like as a classic ioctl with an extra parameter for
argument length for better sanity checks:
int
rte_eth_dev_ioctl(uint16_t port, uint64_t ctl, void *argp,
unsigned arg_length);
Regards,
Andrey
More information about the dev
mailing list