From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id E0EE45B2C for ; Mon, 30 Jul 2018 18:14:42 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAoi-00009D-66; Mon, 30 Jul 2018 16:14:40 +0000 From: Christian Ehrhardt To: Adrien Mazarguil Cc: Bernard Iremonger , dpdk stable Date: Mon, 30 Jul 2018 18:11:01 +0200 Message-Id: <20180730161342.16566-16-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'app/testpmd: fix crash when attaching a device' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:14:43 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 75e9d719c9a69bd0d142115f4578c38cb9054fa3 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Wed, 13 Jun 2018 18:27:43 +0200 Subject: [PATCH] app/testpmd: fix crash when attaching a device [ upstream commit 422515b9aab0f1161631276d682303356e243c07 ] Below commit checks global device information to determine if a port uses the softnic driver once initialized. Problem is that this information is not available at this point when a port is initialized interactively through a "port attach XXX" command, crashing testpmd. This patch systematically initializes global device information to address this issue. Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode") Signed-off-by: Adrien Mazarguil Acked-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 35cf26674..24c199844 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2355,16 +2355,15 @@ init_port_config(void) { portid_t pid; struct rte_port *port; - struct rte_eth_dev_info dev_info; RTE_ETH_FOREACH_DEV(pid) { port = &ports[pid]; port->dev_conf.fdir_conf = fdir_conf; + rte_eth_dev_info_get(pid, &port->dev_info); if (nb_rxq > 1) { - rte_eth_dev_info_get(pid, &dev_info); port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL; port->dev_conf.rx_adv_conf.rss_conf.rss_hf = - rss_hf & dev_info.flow_type_rss_offloads; + rss_hf & port->dev_info.flow_type_rss_offloads; } else { port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL; port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0; -- 2.17.1