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 9F7C9A0C41 for ; Thu, 30 Sep 2021 15:46:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89DC841124; Thu, 30 Sep 2021 15:46:28 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 4D88C40DDA; Thu, 30 Sep 2021 15:46:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10122"; a="288844304" X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="288844304" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2021 06:46:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="539434103" Received: from silpixa00399839.ir.intel.com (HELO localhost.localdomain) ([10.237.222.139]) by fmsmga004.fm.intel.com with ESMTP; 30 Sep 2021 06:46:22 -0700 From: Ciara Loftus To: dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com, stephen@networkplumber.org, Ciara Loftus Date: Thu, 30 Sep 2021 13:46:04 +0000 Message-Id: <20210930134604.32585-1-ciara.loftus@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes 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. 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 --- drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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