From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B6A6F1B626 for ; Fri, 13 Oct 2017 14:22:32 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 05:22:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="162293032" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by fmsmga005.fm.intel.com with ESMTP; 13 Oct 2017 05:22:22 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net, adrien.mazarguil@6wind.com, jingjing.wu@intel.com, john.mcnamara@intel.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, jasvinder.singh@intel.com Date: Fri, 13 Oct 2017 13:22:15 +0100 Message-Id: <1507897338-236951-3-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507897338-236951-1-git-send-email-cristian.dumitrescu@intel.com> References: <1507301136-131382-2-git-send-email-cristian.dumitrescu@intel.com> <1507897338-236951-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH V4 2/5] ethdev: add new eth_dev_ops function for mtr ops get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 12:22:33 -0000 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 --- Changes in v4: - None Changes in v3: - None Changes in v2: -None 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index aaf02b3..b773589 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.7.4