From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 943B4C6DE for ; Wed, 15 Jun 2016 16:06:58 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 15 Jun 2016 07:06:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,476,1459839600"; d="scan'208";a="976237567" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 15 Jun 2016 07:06:27 -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 u5FE6Qw1013532; Wed, 15 Jun 2016 15:06:26 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u5FE6Q32006408; Wed, 15 Jun 2016 15:06:26 +0100 Received: (from reshmapa@localhost) by sivswdev02.ir.intel.com with id u5FE6Qo3006404; Wed, 15 Jun 2016 15:06:26 +0100 From: Reshma Pattan To: dev@dpdk.org Cc: Reshma Pattan Date: Wed, 15 Jun 2016 15:06:20 +0100 Message-Id: <1465999584-6343-4-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465999584-6343-1-git-send-email-reshma.pattan@intel.com> References: <1465897108-26548-1-git-send-email-reshma.pattan@intel.com> <1465999584-6343-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-dev] [PATCH v10 3/7] ethdev: add new fields to ethdev 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: , X-List-Received-Date: Wed, 15 Jun 2016 14:06:59 -0000 The new fields nb_rx_queues and nb_tx_queues are added to the rte_eth_dev_info structure. Changes to API rte_eth_dev_info_get() are done to update these new fields to the rte_eth_dev_info object. Release notes is updated with the changes. The librte_pdump library needs to register Rx and Tx callbacks for all the nb_rx_queues and nb_tx_queues, when application wants to capture the packets on all the software configured number of Rx and Tx queues of the device. So far there is no support to get nb_rx_queues and nb_tx_queues information from the ethdev library. Hence these changes are introduced. Signed-off-by: Reshma Pattan --- doc/guides/rel_notes/release_16_07.rst | 6 ++++++ lib/librte_ether/rte_ethdev.c | 2 ++ lib/librte_ether/rte_ethdev.h | 3 +++ lib/librte_ether/rte_ether_version.map | 1 + 4 files changed, 12 insertions(+) diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index c0f6b02..004ecee 100644 --- a/doc/guides/rel_notes/release_16_07.rst +++ b/doc/guides/rel_notes/release_16_07.rst @@ -135,6 +135,9 @@ API Changes ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff. +* Function ``rte_eth_dev_info_get`` updated to return new fields ``nb_rx_queues`` and ``nb_tx_queues`` + in the ``rte_eth_dev_info`` object. + ABI Changes ----------- @@ -146,6 +149,9 @@ ABI Changes * The ``rte_port_source_params`` structure has new fields to support PCAP file. It was already in release 16.04 with ``RTE_NEXT_ABI`` flag. +* The ``rte_eth_dev_info`` structure has new fields ``nb_rx_queues`` and ``nb_tx_queues`` + to support number of queues configured by software. + Shared Library Versions ----------------------- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 97d167e..1f634c9 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_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 237e6ef..8ad7c01 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