From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C217A0C41 for ; Fri, 8 Oct 2021 09:50:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60D4840DDA; Fri, 8 Oct 2021 09:50:32 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 197CC40040; Fri, 8 Oct 2021 09:50:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="226357747" X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="226357747" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 00:50:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="439847869" Received: from silpixa00399839.ir.intel.com (HELO localhost.localdomain) ([10.237.222.139]) by orsmga006.jf.intel.com with ESMTP; 08 Oct 2021 00:50:27 -0700 From: Ciara Loftus To: dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com, stephen@networkplumber.org, Ciara Loftus Date: Fri, 8 Oct 2021 07:50:20 +0000 Message-Id: <20211008075020.22003-1-ciara.loftus@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210930134604.32585-1-ciara.loftus@intel.com> References: <20210930134604.32585-1-ciara.loftus@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" Since the AF_XDP PMD does not work for secondary processes as reported in Bugzilla 805, check for the process type at the beginning of probe and return ENOTSUP if the process type is secondary. It is planned that secondary processes will be supported by the PMD in full in a future release by using rte_mp_msg to pass the state to the secondary process that it requires in order to work. Bugzilla ID: 805 Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Cc: stable@dpdk.org Signed-off-by: Ciara Loftus Reported-by: Stephen Hemminger --- doc/guides/rel_notes/release_21_11.rst | 4 ++++ drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index efeffe37a0..f30299ae7e 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -67,6 +67,10 @@ New Features Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and TCP/UDP/SCTP header checksum field can be used as input set for RSS. +* **Updated AF_XDP PMD.** + + * Disabled secondary process support. + * **Updated Broadcom bnxt PMD.** * Added flow offload support for Thor. diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 9bea0a895a..d61cb0aa7c 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1790,16 +1790,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev) rte_vdev_device_name(dev)); name = rte_vdev_device_name(dev); - if (rte_eal_process_type() == RTE_PROC_SECONDARY && - strlen(rte_vdev_device_args(dev)) == 0) { - eth_dev = rte_eth_dev_attach_secondary(name); - if (eth_dev == NULL) { - AF_XDP_LOG(ERR, "Failed to probe %s\n", name); - return -EINVAL; - } - eth_dev->dev_ops = &ops; - rte_eth_dev_probing_finish(eth_dev); - return 0; + if (rte_eal_process_type() == RTE_PROC_SECONDARY) { + AF_XDP_LOG(ERR, "Failed to probe %s. " + "AF_XDP PMD does not support secondary processes.\n", + name); + return -ENOTSUP; } kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments); -- 2.17.1