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 D030C1B535 for ; Thu, 7 Feb 2019 14:28:44 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 369E842BDA; Thu, 7 Feb 2019 13:28:44 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A752600C4; Thu, 7 Feb 2019 13:28:43 +0000 (UTC) From: Kevin Traynor To: Michal Krawczyk Cc: dpdk stable Date: Thu, 7 Feb 2019 13:26:08 +0000 Message-Id: <20190207132614.20538-62-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 07 Feb 2019 13:28:44 +0000 (UTC) Subject: [dpdk-stable] patch 'net/ena: fix dev init with multi-process' has been queued to LTS release 18.11.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: Thu, 07 Feb 2019 13:28:45 -0000 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 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 | 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 = ð_ena_recv_pkts; eth_dev->tx_pkt_burst = ð_ena_xmit_pkts; eth_dev->tx_pkt_prepare = ð_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 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,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));