From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D379A04B5 for ; Tue, 3 Dec 2019 19:27:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E209C2B8D; Tue, 3 Dec 2019 19:27:34 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 160501F5 for ; Tue, 3 Dec 2019 19:27:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iRfofdvd9GWjlUbMWMDyY31dIfOwklNwXV/87iJcymc=; b=V12184bs/D7p/mezGrFbHBUDcAHy27laFKS1dqNSErE11EiKmpNVedTpvSO13+O04dR+Pz 457pIs3Me7VWsrHAhHEsl+my9sdQeqqA7+/fOtcaKEPFRrcDMAHp0OVyianzSZ2T2NG2GB i27Yx09xCjJ88wtlraT2VXLsNXlvHEE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-RrKIQKjoN86XRjh92_1OGA-1; Tue, 03 Dec 2019 13:27:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 57D1A477; Tue, 3 Dec 2019 18:27:28 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18AC35C3FA; Tue, 3 Dec 2019 18:27:26 +0000 (UTC) From: Kevin Traynor To: Andrew Rybchenko Cc: Ferruh Yigit , dpdk stable Date: Tue, 3 Dec 2019 18:26:10 +0000 Message-Id: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: RrKIQKjoN86XRjh92_1OGA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/10/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/7c955e08169b43ff6a= fca1b254f29b3231bba601 Thanks. Kevin. --- >From 7c955e08169b43ff6afca1b254f29b3231bba601 Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Thu, 12 Sep 2019 17:42:12 +0100 Subject: [PATCH] ethdev: remove redundant device info cleanup before get [ upstream commit 78402e16ec08db79a2e380466ff41dd939541265 ] rte_eth_dev_info_get() always fills in device information memory with zeros on entry. Fixes: b6719879855d ("ethdev: avoid getting uninitialized info for bad port= ") Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 4 ---- app/test-pmd/config.c | 2 -- examples/ethtool/lib/rte_ethtool.c | 2 -- examples/kni/main.c | 1 - 4 files changed, 9 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index fe9792643..f7f590b92 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2252,5 +2252,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result, =09uint32_t key_len; =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(res->port_id, &dev_info); =09if (dev_info.hash_key_size > 0 && @@ -2785,5 +2784,4 @@ cmd_set_rss_reta_parsed(void *parsed_result, =09struct cmd_config_rss_reta *res =3D parsed_result; =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(res->port_id, &dev_info); =09if (dev_info.reta_size =3D=3D 0) { @@ -2905,5 +2903,4 @@ cmd_showport_reta_parsed(void *parsed_result, =09uint16_t max_reta_size; =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(res->port_id, &dev_info); =09max_reta_size =3D RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512); @@ -10932,5 +10929,4 @@ cmd_flow_director_filter_parsed(void *parsed_result= , =09=09=09struct rte_eth_dev_info dev_info; =20 -=09=09=09memset(&dev_info, 0, sizeof(dev_info)); =09=09=09rte_eth_dev_info_get(res->port_id, &dev_info); =09=09=09errno =3D 0; diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 4870b9004..1f61e4c2d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -407,5 +407,4 @@ port_infos_display(portid_t port_id) =09port =3D &ports[port_id]; =09rte_eth_link_get_nowait(port_id, &link); -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(port_id, &dev_info); =09printf("\n%s Infos for port %-2d %s\n", @@ -1545,5 +1544,4 @@ ring_rx_descriptor_display(const struct rte_memzone *= ring_mz, =09struct rte_eth_dev_info dev_info; =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(port_id, &dev_info); =09if (strstr(dev_info.driver_name, "i40e") !=3D NULL) { diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_= ethtool.c index e6a2e88c7..63344376c 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -41,5 +41,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_= drvinfo *drvinfo) =09=09 "the minimum size should be %d\n", ret); =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(port_id, &dev_info); =20 @@ -373,5 +372,4 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id) =09uint16_t vf; =20 -=09memset(&dev_info, 0, sizeof(dev_info)); =09rte_eth_dev_info_get(port_id, &dev_info); =09num_vfs =3D dev_info.max_vfs; diff --git a/examples/kni/main.c b/examples/kni/main.c index a58774a33..5dff7d3b5 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -901,5 +901,4 @@ kni_alloc(uint16_t port_id) =09=09=09const struct rte_bus *bus =3D NULL; =20 -=09=09=09memset(&dev_info, 0, sizeof(dev_info)); =09=09=09rte_eth_dev_info_get(port_id, &dev_info); =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:51.848811423 +0000 +++ 0001-ethdev-remove-redundant-device-info-cleanup-before-g.patch=092019-= 12-03 17:29:51.673751557 +0000 @@ -1 +1 @@ -From 78402e16ec08db79a2e380466ff41dd939541265 Mon Sep 17 00:00:00 2001 +From 7c955e08169b43ff6afca1b254f29b3231bba601 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 78402e16ec08db79a2e380466ff41dd939541265 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index b6bc34b4d..e4dda93a4 100644 +index fe9792643..f7f590b92 100644 @@ -25 +26 @@ -@@ -2320,5 +2320,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result, +@@ -2252,5 +2252,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result, @@ -31 +32 @@ -@@ -2853,5 +2852,4 @@ cmd_set_rss_reta_parsed(void *parsed_result, +@@ -2785,5 +2784,4 @@ cmd_set_rss_reta_parsed(void *parsed_result, @@ -37 +38 @@ -@@ -2973,5 +2971,4 @@ cmd_showport_reta_parsed(void *parsed_result, +@@ -2905,5 +2903,4 @@ cmd_showport_reta_parsed(void *parsed_result, @@ -43 +44 @@ -@@ -11092,5 +11089,4 @@ cmd_flow_director_filter_parsed(void *parsed_resul= t, +@@ -10932,5 +10929,4 @@ cmd_flow_director_filter_parsed(void *parsed_resul= t, @@ -50 +51 @@ -index 1a5a5c13c..523b3d376 100644 +index 4870b9004..1f61e4c2d 100644 @@ -53 +54 @@ -@@ -479,5 +479,4 @@ port_infos_display(portid_t port_id) +@@ -407,5 +407,4 @@ port_infos_display(portid_t port_id) @@ -59 +60 @@ -@@ -1624,5 +1623,4 @@ ring_rx_descriptor_display(const struct rte_memzone = *ring_mz, +@@ -1545,5 +1544,4 @@ ring_rx_descriptor_display(const struct rte_memzone = *ring_mz, @@ -66 +67 @@ -index 571c4e5aa..fd1692daa 100644 +index e6a2e88c7..63344376c 100644 @@ -69 +70 @@ -@@ -42,5 +42,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool= _drvinfo *drvinfo) +@@ -41,5 +41,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool= _drvinfo *drvinfo) @@ -82 +83 @@ -index 4710d7176..17f695ea9 100644 +index a58774a33..5dff7d3b5 100644 @@ -85,2 +86,2 @@ -@@ -899,5 +899,4 @@ kni_alloc(uint16_t port_id) - =09=09=09struct rte_eth_dev_info dev_info; +@@ -901,5 +901,4 @@ kni_alloc(uint16_t port_id) + =09=09=09const struct rte_bus *bus =3D NULL;