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 CF195A00C5; Wed, 16 Feb 2022 17:05:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E9EC410FF; Wed, 16 Feb 2022 17:05:39 +0100 (CET) Received: from mail-io1-f99.google.com (mail-io1-f99.google.com [209.85.166.99]) by mails.dpdk.org (Postfix) with ESMTP id 8185740150 for ; Wed, 16 Feb 2022 17:05:38 +0100 (CET) Received: by mail-io1-f99.google.com with SMTP id s1so270107ioe.0 for ; Wed, 16 Feb 2022 08:05:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:message-id; bh=lCmJk4tJ+U8TtGumatW3Gav0w4WiiPIl6+ltWD0l2QE=; b=t6OX6aiCC4CVJsayr+wBMQRc7BAhmk9DtJBMJlLy1DJsMW0mVKoMZLqaPLIhOfo3IU ftYINFqnd+frPVWCMCsb0eguOVPAQYSAVVMuef0tJkyCINbEd2yD1yslKRKgghGTqBVY ivL2YPpHswACBT4u+ip7cIw7cbLcIVZlIiP5RygW9LCFBVOvgp84vv7PcfMEUTuNUJ5u 6APGwQ2n9ijkWZ9VLi/qEQ0qAEevwEc0A8SwT+D+L0ZGzo/UCXCAR1+LtyDtViVhMIPg P+XQgUhzcwV5fIvtRjYZ9lss9fqK0ByLqlNYdjCdAmdtcuUT33VRD+pJu3IJvIlY3WPF CzuA== X-Gm-Message-State: AOAM532vshtJDzZDlOkmnry3O4fiN5RcfgaPh8ufBzoTuf9BRvlmVHQJ l3hP5DFotvhyP/5zJ/Zmdc88/BeATjrJLeOQX6HLeyNO+p0TwA== X-Google-Smtp-Source: ABdhPJxovPGKWZqavMrzVgfYgKPWQHYuQxnSUPUKZ3/XKB3jaw5yuIlBm1z2Xah1RJBFMx9HNCFHLRYE+LHy X-Received: by 2002:a02:7013:0:b0:30c:e898:6942 with SMTP id f19-20020a027013000000b0030ce8986942mr2144375jac.78.1645027536624; Wed, 16 Feb 2022 08:05:36 -0800 (PST) Received: from optima.cs.arizona.edu (optima.cs.arizona.edu. [192.12.69.5]) by smtp-relay.gmail.com with ESMTPS id j7sm791047jaq.41.2022.02.16.08.05.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Feb 2022 08:05:36 -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 21GG5Zxd030349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Feb 2022 09:05:35 -0700 Received: from localhost (cs.arizona.edu [local]) by cs.arizona.edu (OpenSMTPD) with ESMTPA id de7cc7bb for ; Wed, 16 Feb 2022 16:05:31 +0000 (UTC) From: Junxiao Shi Date: Wed, 16 Feb 2022 15:59:29 +0000 Subject: [PATCH] net/af_xdp: allow operation when multiprocess is disabled To: dev@dpdk.org Message-ID: <2c42205a4bcc20cd@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..7f23097c5f 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