[dpdk-stable] patch 'net/ena: fix dev init with multi-process' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 7 14:26:08 CET 2019


Hi,

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

Thanks.

Kevin Traynor

---
>From 200d6555caa87e4f016f6f0a1c593f467f23d54c Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk at semihalf.com>
Date: Fri, 25 Jan 2019 09:10:25 +0100
Subject: [PATCH] net/ena: fix dev init with multi-process

[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]

The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.

Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk at semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 333615700..6d06fcba8 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1575,17 +1575,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 	bool wd_state;
 
-	memset(adapter, 0, sizeof(struct ena_adapter));
-	ena_dev = &adapter->ena_dev;
-
 	eth_dev->dev_ops = &ena_dev_ops;
 	eth_dev->rx_pkt_burst = &eth_ena_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_ena_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_ena_prep_pkts;
+
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
+	memset(adapter, 0, sizeof(struct ena_adapter));
+	ena_dev = &adapter->ena_dev;
+
 	adapter->rte_eth_dev_data = eth_dev->data;
 	adapter->rte_dev = eth_dev;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return 0;
-
 	pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	adapter->pdev = pci_dev;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-02-07 13:19:57.065325823 +0000
+++ 0062-net-ena-fix-dev-init-with-multi-process.patch	2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From fd9768905870856a2340266d25f8c0100dfccfff Mon Sep 17 00:00:00 2001
+From 200d6555caa87e4f016f6f0a1c593f467f23d54c Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk at semihalf.com>
 Date: Fri, 25 Jan 2019 09:10:25 +0100
 Subject: [PATCH] net/ena: fix dev init with multi-process
 
+[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]
+
 The check for proc type in eth_ena_dev_init() should appear before
 modyfing adapter structure.
 
@@ -11,7 +13,6 @@
 main process.
 
 Fixes: 1173fca25af9 ("ena: add polling-mode driver")
-Cc: stable at dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk at semihalf.com>
 ---
@@ -19,10 +20,10 @@
  1 file changed, 7 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index fde5fa743..747390bb7 100644
+index 333615700..6d06fcba8 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1716,17 +1716,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1575,17 +1575,18 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
  	bool wd_state;
  
 -	memset(adapter, 0, sizeof(struct ena_adapter));


More information about the stable mailing list