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 6DD2FA00BE; Thu, 17 Feb 2022 12:14:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB14C41156; Thu, 17 Feb 2022 12:14:45 +0100 (CET) Received: from mail-oo1-f99.google.com (mail-oo1-f99.google.com [209.85.161.99]) by mails.dpdk.org (Postfix) with ESMTP id 3B6E441151 for ; Thu, 17 Feb 2022 12:14:44 +0100 (CET) Received: by mail-oo1-f99.google.com with SMTP id k13-20020a4a948d000000b003172f2f6bdfso6152086ooi.1 for ; Thu, 17 Feb 2022 03:14:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:in-reply-to:references:from:date:subject:to :message-id; bh=Pf4SZMXyqWnE2Uqi8ARglhpjqN4TyHeesgby/q6qz/I=; b=iKGJmFl7oPj7CG6mOWwuh7bO+utUEWnQ+93E2Q5jv+PQmNKRcd1+gXEpac/hnwk2Eq RGr50DGu7dZq5JqeKgVv6hkh7wqiDOsvxDJD8vTm7WFvMESwKYHIcWz3wJKfznUO4/i/ 9tiDYbn6N6nK5145NsPTyC2g5vZBlYSbMjlznMvjRMokpfaqYoqbP84LVWIiYnH/UNfp czsG+t1xU2/SSJzr23McjqiFofH0HaVH/1Id4SCxo4XRyPlghUhGkgmgY0AtDBRJrdD8 0qpnOb+phWvn8bG1g469ss7krzX3XEd9C7+VOf4BFm4LQdYglq/ZPmSmCeH5F6INkKVr f6Hg== X-Gm-Message-State: AOAM5336bBAq2g97kahmlu5Ig55x9g5i3Ms86CWELDEojMNGVCriNEmk fPYFjaS3XyJCXpn0DuH2z+8mpaUyOR7VJJUa5E5RWzEe+t4+bw== X-Google-Smtp-Source: ABdhPJw5ytiEZ2JWmWPPCIcro9/v32QJhwGLJvuKxJjy1fzz0+q7HFXYaMZPi/CFa23ZK22GXVzKZNHWehNW X-Received: by 2002:a05:6870:e981:b0:cf:9c39:6ed3 with SMTP id r1-20020a056870e98100b000cf9c396ed3mr821513oao.192.1645096484266; Thu, 17 Feb 2022 03:14:44 -0800 (PST) Received: from optima.cs.arizona.edu (optima.cs.arizona.edu. [192.12.69.5]) by smtp-relay.gmail.com with ESMTPS id bm23sm396131oob.12.2022.02.17.03.14.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Feb 2022 03:14:44 -0800 (PST) X-Relaying-Domain: cs.arizona.edu Received: from cs.arizona.edu (lectura.cs.arizona.edu [192.12.69.186]) by optima.cs.arizona.edu (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id 21HBEhmK020273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Feb 2022 04:14:43 -0700 Received: from localhost (cs.arizona.edu [local]) by cs.arizona.edu (OpenSMTPD) with ESMTPA id 2c109e83 for ; Thu, 17 Feb 2022 11:14:38 +0000 (UTC) In-Reply-To: <2c42205a4bcc20cd@cs.arizona.edu> References: <2c42205a4bcc20cd@cs.arizona.edu> From: Junxiao Shi Date: Thu, 17 Feb 2022 11:09:06 +0000 Subject: [PATCH v2] net/af_xdp: allow operation when multiprocess is disabled To: dev@dpdk.org Message-ID: <2c422567d3640972@cs.arizona.edu> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org If EAL multiprocess feature has been disabled via rte_mp_disable() function, AF_XDP driver may not be able to register its IPC callback. Previously this leads to probe failure. This commit adds a check for this condition so that AF_XDP can still be used even if multiprocess is disabled. Fixes: 9876cf8316b3 ("net/af_xdp: re-enable secondary process support") Signed-off-by: Junxiao Shi --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 6ac710c6bd..2163df7c5c 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1995,7 +1995,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev) /* Register IPC callback which shares xsk fds from primary to secondary */ if (!afxdp_dev_count) { ret = rte_mp_action_register(ETH_AF_XDP_MP_KEY, afxdp_mp_send_fds); - if (ret < 0) { + if (ret < 0 && rte_errno != ENOTSUP) { AF_XDP_LOG(ERR, "%s: Failed to register multi-process IPC callback: %s", name, strerror(rte_errno)); return -1; -- 2.17.1