From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id F2A832BA5 for ; Fri, 8 Mar 2019 18:49:47 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:49:46 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloBP002625; Fri, 8 Mar 2019 19:49:45 +0200 From: Yongseok Koh To: Michal Krawczyk Cc: dpdk stable Date: Fri, 8 Mar 2019 09:47:47 -0800 Message-Id: <20190308174749.30771-69-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/ena: fix dev init with multi-process' has been queued to LTS release 17.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: , X-List-Received-Date: Fri, 08 Mar 2019 17:49:48 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. 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. Yongseok --- >>From 6163dd685aa743d90c7a3708eb31179bf9bfec61 Mon Sep 17 00:00:00 2001 From: Michal Krawczyk 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 --- drivers/net/ena/ena_ethdev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index f86a60c66..b347910cc 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1280,19 +1280,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev) static int adapters_found; - memset(adapter, 0, sizeof(struct ena_adapter)); - ena_dev = &adapter->ena_dev; - eth_dev->dev_ops = &ena_dev_ops; eth_dev->rx_pkt_burst = ð_ena_recv_pkts; eth_dev->tx_pkt_burst = ð_ena_xmit_pkts; eth_dev->tx_pkt_prepare = ð_ena_prep_pkts; - adapter->rte_eth_dev_data = eth_dev->data; - adapter->rte_dev = eth_dev; 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; + pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); adapter->pdev = pci_dev; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:43.556749038 -0800 +++ 0069-net-ena-fix-dev-init-with-multi-process.patch 2019-03-08 09:46:40.389408000 -0800 @@ -1,8 +1,10 @@ -From fd9768905870856a2340266d25f8c0100dfccfff Mon Sep 17 00:00:00 2001 +From 6163dd685aa743d90c7a3708eb31179bf9bfec61 Mon Sep 17 00:00:00 2001 From: Michal Krawczyk 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@dpdk.org Signed-off-by: Michal Krawczyk --- @@ -19,12 +20,12 @@ 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c -index fde5fa743..747390bb7 100644 +index f86a60c66..b347910cc 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c -@@ -1715,19 +1715,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev) +@@ -1280,19 +1280,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev) + static int adapters_found; - bool wd_state; - memset(adapter, 0, sizeof(struct ena_adapter)); - ena_dev = &adapter->ena_dev;