From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31CC7A056A for ; Mon, 2 Mar 2020 18:36:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC8081BFF9; Mon, 2 Mar 2020 18:36:54 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AEB1023D; Mon, 2 Mar 2020 18:36:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 09:36:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,507,1574150400"; d="scan'208";a="228535133" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga007.jf.intel.com with ESMTP; 02 Mar 2020 09:36:48 -0800 From: Ferruh Yigit To: dev@dpdk.org, Tetsuya Mukawa , Yasufumi Ogawa Cc: Ferruh Yigit , stable@dpdk.org Date: Mon, 2 Mar 2020 17:36:40 +0000 Message-Id: <20200302173646.54984-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 1/6] net/null: fix secondary burst function selection 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Secondary process uses the primary process device and while setting the Rx/Tx functions it uses the device arguments from the secondary process instead of the primary ones. This may cause primary and secondary process use different Rx/Tx functions unintentionally. Fixes: bccc77a6a74a ("net/null: fix multi-process Rx and Tx") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: yasufum.o@gmail.com --- drivers/net/null/rte_eth_null.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 025b73acb..87a29b853 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -584,6 +584,7 @@ rte_pmd_null_probe(struct rte_vdev_device *dev) PMD_LOG(INFO, "Initializing pmd_null for %s", name); if (rte_eal_process_type() == RTE_PROC_SECONDARY) { + struct pmd_internals *internals; eth_dev = rte_eth_dev_attach_secondary(name); if (!eth_dev) { PMD_LOG(ERR, "Failed to probe %s", name); @@ -592,7 +593,8 @@ rte_pmd_null_probe(struct rte_vdev_device *dev) /* TODO: request info from primary to set up Rx and Tx */ eth_dev->dev_ops = &ops; eth_dev->device = &dev->device; - if (packet_copy) { + internals = eth_dev->data->dev_private; + if (internals->packet_copy) { eth_dev->rx_pkt_burst = eth_null_copy_rx; eth_dev->tx_pkt_burst = eth_null_copy_tx; } else { -- 2.24.1