From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3EE931B3F5 for ; Fri, 23 Nov 2018 11:30:03 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5EC2E308339C; Fri, 23 Nov 2018 10:30:02 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id F285217DA1; Fri, 23 Nov 2018 10:30:00 +0000 (UTC) From: Kevin Traynor To: Radu Nicolau Cc: Chas Williams , dpdk stable Date: Fri, 23 Nov 2018 10:26:45 +0000 Message-Id: <20181123102713.17309-41-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 23 Nov 2018 10:30:02 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bonding: fix crash on probe' has been queued to stable release 18.08.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: Fri, 23 Nov 2018 10:30:03 -0000 Hi, FYI, your patch has been queued to stable release 18.08.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 11/29/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From ebd94d5c7d6180d31c9311f70a15c7a7ac2225c2 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Wed, 31 Oct 2018 15:50:08 +0000 Subject: [PATCH] net/bonding: fix crash on probe [ upstream commit 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 ] After the patch below the call to rte_eth_bond_8023ad_agg_selection_set from probe() segfaults; there is no need to call the function, just set the mode directly. Also, reverted 1620175b400e. Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing") Fixes: 1620175b400e ("net/bonding: fix invalid port id") Signed-off-by: Radu Nicolau Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 0afc31bd6..d03f7ce7e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3199,6 +3199,4 @@ bond_probe(struct rte_vdev_device *dev) internals->kvlist = kvlist; - rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); - if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) { if (rte_kvargs_process(kvlist, @@ -3213,10 +3211,10 @@ bond_probe(struct rte_vdev_device *dev) if (internals->mode == BONDING_MODE_8023AD) - rte_eth_bond_8023ad_agg_selection_set(port_id, - agg_mode); + internals->mode4.agg_selection = agg_mode; } else { - rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE); + internals->mode4.agg_selection = AGG_STABLE; } + rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on " "socket %u.", name, port_id, bonding_mode, socket_id); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:55.330728684 +0000 +++ 0041-net-bonding-fix-crash-on-probe.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 Mon Sep 17 00:00:00 2001 +From ebd94d5c7d6180d31c9311f70a15c7a7ac2225c2 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Wed, 31 Oct 2018 15:50:08 +0000 Subject: [PATCH] net/bonding: fix crash on probe +[ upstream commit 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 ] + After the patch below the call to rte_eth_bond_8023ad_agg_selection_set from probe() segfaults; there is no need to call the function, just set the mode directly. @@ -10,7 +12,6 @@ Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing") Fixes: 1620175b400e ("net/bonding: fix invalid port id") -Cc: stable@dpdk.org Signed-off-by: Radu Nicolau Acked-by: Chas Williams @@ -19,17 +20,17 @@ 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 156f31c6b..1a6d8e4df 100644 +index 0afc31bd6..d03f7ce7e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c -@@ -3217,6 +3217,4 @@ bond_probe(struct rte_vdev_device *dev) +@@ -3199,6 +3199,4 @@ bond_probe(struct rte_vdev_device *dev) internals->kvlist = kvlist; - rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); - if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) { if (rte_kvargs_process(kvlist, -@@ -3231,10 +3229,10 @@ bond_probe(struct rte_vdev_device *dev) +@@ -3213,10 +3211,10 @@ bond_probe(struct rte_vdev_device *dev) if (internals->mode == BONDING_MODE_8023AD) - rte_eth_bond_8023ad_agg_selection_set(port_id,