From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 1/3] ethdev: add new eth_dev_ops function for mtr ops get Date: Wed, 13 Sep 2017 11:20:19 +0530 Message-ID: <20170913055018.GA12185@jerin> References: <1496162653-137817-3-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-1-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-2-git-send-email-cristian.dumitrescu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, thomas@monjalon.net, adrien.mazarguil@6wind.com, hemant.agrawal@nxp.com To: Cristian Dumitrescu Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0040.outbound.protection.outlook.com [104.47.41.40]) by dpdk.org (Postfix) with ESMTP id 0446B1396 for ; Wed, 13 Sep 2017 07:50:44 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1503705973-80742-2-git-send-email-cristian.dumitrescu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Sat, 26 Aug 2017 01:06:11 +0100 > From: Cristian Dumitrescu > To: dev@dpdk.org > CC: thomas@monjalon.net, adrien.mazarguil@6wind.com, > jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com > Subject: [PATCH 1/3] ethdev: add new eth_dev_ops function for mtr ops get > X-Mailer: git-send-email 2.7.4 > > Following similar approach to rte_flow and rte_tm for modularity reasons. > > Signed-off-by: Cristian Dumitrescu > --- > Changes in v1 (from RFC [1]): > - Removed ethdev API function to get the MTR ops, as it is not needed > (input from Thomas) > > [1] RFC: http://www.dpdk.org/ml/archives/dev/2017-May/066888.html > > lib/librte_ether/rte_ethdev.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 0adf327..361c9bd 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -1421,6 +1421,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 */ > @@ -1544,6 +1547,9 @@ 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. */ It will useful to have capability info here. In Cavium hardwares, all input pkts are considered as green when they enqueue to ethdev tx queue. On the congestion control on Rx side, We support tail drop and RED per mempool(not per RX queue)