Cristian Dumitrescu
530beded12
ethdev: add traffic management ops get API
The rte_flow feature breaks the monolithic approach for ethdev by introducing the new rte_flow API to ethdev using a plugin-like approach. Basically, the rte_flow API is still logically part of ethdev: - It extends the ethdev functionality: rte_flow is a new feature/ capability of ethdev; - all its functions work on an Ethernet device: the first parameter of the rte_flow functions is Ethernet device port ID. Also, the rte_flow API is a sort of capability plugin for ethdev: - the rte_flow API functions have their own name space: they are called rte_flow_operationXYZ() as opposed to rte_eth_dev_flow_operationXYZ()); - the rte_flow API functions are placed in separate files in the same librte_ether folder as opposed to rte_ethdev.[hc]. The way it works is by using the existing ethdev API function rte_eth_dev_filter_ctrl() to query the current Ethernet device port ID for the support of the rte_flow capability and return the pointer to the rte_flow operations when supported and NULL otherwise: struct rte_flow_ops *eth_flow_ops; int rte = rte_eth_dev_filter_ctrl(eth_port_id, RTE_ETH_FILTER_GENERIC, RTE_ETH_FILTER_GET, ð_flow_ops); This patch reuses the same approach for ethdev Traffic Management API. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%