[dpdk-stable] patch 'net/netvsc: fix crash in secondary process' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:33 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.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 02/13/20. 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 rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 13 Jan 2020 11:12:38 -0800
Subject: [PATCH] net/netvsc: fix crash in secondary process

[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ]

The secondary process would crash trying to get the offload
capability of the device. Since the device capabilities were
already set by the primary process this was unnecessary.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 159116f7f6..c79f924379 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -257,15 +257,16 @@ static int hn_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->max_rx_queues = hv->max_queues;
 	dev_info->max_tx_queues = hv->max_queues;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
+	/* fills in rx and tx offload capability */
 	rc = hn_rndis_get_offload(hv, dev_info);
 	if (rc != 0)
 		return rc;
 
-	rc = hn_vf_info_get(hv, dev_info);
-	if (rc != 0)
-		return rc;
-
-	return 0;
+	/* merges the offload and queues of vf */
+	return hn_vf_info_get(hv, dev_info);
 }
 
 static int hn_rss_reta_update(struct rte_eth_dev *dev,
@@ -929,16 +930,16 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
-	/*
-	 * for secondary processes, we don't initialize any further as primary
-	 * has already done this work.
-	 */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return 0;
-
 	/* Since Hyper-V only supports one MAC address, just use local data */
 	eth_dev->data->mac_addrs = &hv->mac_addr;
 
+	/*
+	 * for secondary processes, we don't initialize any further as primary
+	 * has already done this work.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	hv->vmbus = vmbus;
 	hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP];
 	hv->chim_res  = &vmbus->resource[HV_SEND_BUF_MAP];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:41.955721636 +0000
+++ 0087-net-netvsc-fix-crash-in-secondary-process.patch	2020-02-11 11:17:38.528003740 +0000
@@ -1,14 +1,15 @@
-From f8279f47dd89c026d760ebce99452393d1270849 Mon Sep 17 00:00:00 2001
+From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen at networkplumber.org>
 Date: Mon, 13 Jan 2020 11:12:38 -0800
 Subject: [PATCH] net/netvsc: fix crash in secondary process
 
+[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ]
+
 The secondary process would crash trying to get the offload
 capability of the device. Since the device capabilities were
 already set by the primary process this was unnecessary.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable at dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
 ---


More information about the stable mailing list