From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B39734C79 for ; Wed, 7 Mar 2018 13:08:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2018 04:08:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,435,1515484800"; d="scan'208";a="209562608" Received: from rhorton-mobl1.ger.corp.intel.com (HELO FC23.ir.intel.com) ([163.33.230.83]) by fmsmga006.fm.intel.com with ESMTP; 07 Mar 2018 04:08:55 -0800 From: Remy Horton To: dev@dpdk.org Cc: Wenzhuo Lu , Jingjing Wu , Qi Zhang , Beilei Xing , Shreyansh Jain , Thomas Monjalon Date: Wed, 7 Mar 2018 12:08:49 +0000 Message-Id: <20180307120851.5822-3-remy.horton@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180307120851.5822-1-remy.horton@intel.com> References: <20180307120851.5822-1-remy.horton@intel.com> Subject: [dpdk-dev] [RFC PATCH v1 2/4] net/e1000: add TxRx tuning parameters 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: Wed, 07 Mar 2018 12:08:58 -0000 The optimal values of several transmission & reception related parameters, such as burst sizes, descriptor ring sizes, and number of queues, varies between different network interface devices. This patch allows individual PMDs to specify preferred parameter values. Signed-off-by: Remy Horton --- drivers/net/e1000/em_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 242375f..e81abd1 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1099,6 +1099,8 @@ static void eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) { struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct rte_eth_dev_pref_queue_info *pref_q_info = + &dev_info->preferred_queue_values; dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(dev); dev_info->min_rx_bufsize = 256; /* See BSIZE field of RCTL register. */ @@ -1152,6 +1154,12 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->speed_capa = ETH_LINK_SPEED_10M_HD | ETH_LINK_SPEED_10M | ETH_LINK_SPEED_100M_HD | ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G; + + /* Preferred queue parameters */ + pref_q_info->nb_tx_queues = 1; + pref_q_info->nb_rx_queues = 1; + pref_q_info->tx_ring_size = 256; + pref_q_info->rx_ring_size = 256; } /* return 0 means link status changed, -1 means not changed */ -- 2.9.5