From patchwork Thu Apr 14 09:44:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pattan, Reshma" X-Patchwork-Id: 12034 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D274E4AC7; Thu, 14 Apr 2016 11:44:45 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E0A3D3977 for ; Thu, 14 Apr 2016 11:44:42 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 14 Apr 2016 02:44:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,484,1455004800"; d="scan'208";a="85003813" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 14 Apr 2016 02:44:38 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u3E9ictg021447 for ; Thu, 14 Apr 2016 10:44:38 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u3E9ibrt008260 for ; Thu, 14 Apr 2016 10:44:37 +0100 Received: (from reshmapa@localhost) by sivswdev02.ir.intel.com with id u3E9ibfl008256 for dev@dpdk.org; Thu, 14 Apr 2016 10:44:37 +0100 From: Reshma Pattan To: dev@dpdk.org Date: Thu, 14 Apr 2016 10:44:37 +0100 Message-Id: <1460627077-8207-3-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1460627077-8207-1-git-send-email-reshma.pattan@intel.com> References: <1460627077-8207-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-dev] [RFC 2/2] librte_ether: add new fields to rte_eth_dev_info struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New fields nb_rx_queues and nb_tx_queues are added to rte_eth_dev_info structure. Changes to API rte_eth_dev_info_get() are done to update these new fields to rte_eth_dev_info object. Signed-off-by:reshma Pattan Acked-by: John McNamara --- lib/librte_ether/rte_ethdev.c | 2 ++ lib/librte_ether/rte_ethdev.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index a31018e..032c6bf 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1661,6 +1661,8 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info) (*dev->dev_ops->dev_infos_get)(dev, dev_info); dev_info->pci_dev = dev->pci_dev; dev_info->driver_name = dev->data->drv_name; + dev_info->nb_tx_queues = dev->data->nb_tx_queues; + dev_info->nb_rx_queues = dev->data->nb_rx_queues; } int diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 022733e..e8e370d 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -908,6 +908,9 @@ struct rte_eth_dev_info { struct rte_eth_desc_lim rx_desc_lim; /**< RX descriptors limits */ struct rte_eth_desc_lim tx_desc_lim; /**< TX descriptors limits */ uint32_t speed_capa; /**< Supported speeds bitmap (ETH_LINK_SPEED_). */ + /** number of queues configured by software*/ + uint16_t nb_rx_queues; /**< Number of RX queues. */ + uint16_t nb_tx_queues; /**< Number of TX queues. */ }; /**