From 10f32b0f4ebc06000d1cbc14c1b95f8acc5c62ec Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Fri, 13 Oct 2017 13:22:15 +0100 Subject: [PATCH] ethdev: add operation to get MTR ops Following similar approach as rte_flow and rte_tm for modularity reasons, the ops for the new rte_mtr API are retrieved through a new eth_dev_ops function. Signed-off-by: Cristian Dumitrescu Acked-by: Hemant Agrawal --- lib/librte_ether/rte_ethdev.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index aaf02b33d3..b773589d61 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1499,6 +1499,9 @@ typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev, typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops); /**< @internal Get Traffic Management (TM) operations on an Ethernet device */ +typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops); +/**< @internal Get Trafffic Metering and Policing (MTR) operations */ + typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev, struct rte_eth_dcb_info *dcb_info); /**< @internal Get dcb information on an Ethernet device */ @@ -1627,6 +1630,10 @@ struct eth_dev_ops { eth_tm_ops_get_t tm_ops_get; /**< Get Traffic Management (TM) operations. */ + + eth_mtr_ops_get_t mtr_ops_get; + /**< Get Traffic Metering and Policing (MTR) operations. */ + eth_pool_ops_supported_t pool_ops_supported; /**< Test if a port supports specific mempool ops */ }; -- 2.20.1