From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reshma Pattan Subject: [PATCH v4 3/9] librte_ether: add new fields to rte_eth_dev_info struct Date: Mon, 23 May 2016 22:38:26 +0100 Message-ID: <1464039512-2683-4-git-send-email-reshma.pattan@intel.com> References: <1463503030-10318-1-git-send-email-reshma.pattan@intel.com> <1464039512-2683-1-git-send-email-reshma.pattan@intel.com> Cc: Reshma Pattan To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6959558F1 for ; Mon, 23 May 2016 23:46:16 +0200 (CEST) In-Reply-To: <1464039512-2683-1-git-send-email-reshma.pattan@intel.com> 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" Add new fields to rte_eth_dev_info struct 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 --- lib/librte_ether/rte_ethdev.c | 2 ++ lib/librte_ether/rte_ethdev.h | 3 +++ lib/librte_ether/rte_ether_version.map | 1 + 3 files changed, 6 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 6331759..3ee5b9f 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1666,6 +1666,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_rx_queues = dev->data->nb_rx_queues; + dev_info->nb_tx_queues = dev->data->nb_tx_queues; } int diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 92b07a9..106318f 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -882,6 +882,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_). */ + /** Configured number of rx/tx queues */ + uint16_t nb_rx_queues; /**< Number of RX queues. */ + uint16_t nb_tx_queues; /**< Number of TX queues. */ }; /** diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map index c990b04..d06d648 100644 --- a/lib/librte_ether/rte_ether_version.map +++ b/lib/librte_ether/rte_ether_version.map @@ -137,4 +137,5 @@ DPDK_16.07 { global: rte_eth_add_first_rx_callback; + rte_eth_dev_info_get; } DPDK_16.04; -- 2.5.0