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 CB623A00BE; Thu, 17 Feb 2022 13:46:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57F6141153; Thu, 17 Feb 2022 13:46:59 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D939741150 for ; Thu, 17 Feb 2022 13:46:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645102017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WlNk/J4c+CuIt8jOD9NNW/qKLZ+UxAbTbtYEgk9LwIc=; b=EO91cVpCSYlKMizMUy6Tygm6kdIjMHaswMASB+t9zMAXHsjXEuTdxR1yUIuRDXq84cARuO tImgD2AyV2wgpdRASpIN9GoCU1s5HDmgE+OQU643BLFbj+S5Ih9XFTlyX3SADif+vR7Iy5 leNGyCIPKgZW8EzFwbdP9vLdAy9QR1I= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-HR7CRt3HNt232AB_OnDCJA-1; Thu, 17 Feb 2022 07:46:56 -0500 X-MC-Unique: HR7CRt3HNt232AB_OnDCJA-1 Received: by mail-lj1-f200.google.com with SMTP id q17-20020a2e7511000000b0023c95987502so2278309ljc.16 for ; Thu, 17 Feb 2022 04:46:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WlNk/J4c+CuIt8jOD9NNW/qKLZ+UxAbTbtYEgk9LwIc=; b=j90ZLW10zC0TF5uXb438bblVqFQ2aF9HrGmKz6RMpjN97Lfdnq+Mp4CfDYKN+WEPrH PGGMVDR3RiRtgaexShBiIhvhiCTwCdRn1AcZJvEAQtL+CwrF0O/UOSK+hsCSDuDUDaOQ 30lp1mOdJ7fiOlKrU1LmFU8zMxM5JN1nP+YgGv7Nf1GuC2rwiqyGQMWpVIEzVmD4l+l8 vOBaMln6YXvVUeLTCtbrbUavX+kGcUaZ+2qLBD7WHW/K+nWKHy5u37PaYuzrUhE1Dm+m D59nXIeDmC/CO3tZrIw2LkcuY8aIoED3Hyw5fgFTtA3Hf1oHUJ0an4qI72XehSU7Ib8u tw9g== X-Gm-Message-State: AOAM530oVG7nToMPCv7M50embkjRqb4QEnIhfS6V0EqgTcv9yvvsPDBb LO2SBgIu/3c3SocMmtMnc1XHeEfb4dMXMY+O3OVtDiJLGrM8U/Nx6RR1lmCPDaGKvVGBSLSx1F0 PnLFRaTp/BZ1b8EtT4e8= X-Received: by 2002:a05:6512:3b9a:b0:43e:da0a:cab with SMTP id g26-20020a0565123b9a00b0043eda0a0cabmr2001582lfv.575.1645102014479; Thu, 17 Feb 2022 04:46:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6kgwOM9avxSXeNkyDVu/eraWk//l+T4kB630DXmkoLfUZFnLSMiNCUXhaY4xgpoY9hyVPbg8NH0eJprCHhh8= X-Received: by 2002:a05:6512:3b9a:b0:43e:da0a:cab with SMTP id g26-20020a0565123b9a00b0043eda0a0cabmr2001569lfv.575.1645102014255; Thu, 17 Feb 2022 04:46:54 -0800 (PST) MIME-Version: 1.0 References: <2c42205a4bcc20cd@cs.arizona.edu> <2c422567d3640972@cs.arizona.edu> In-Reply-To: <2c422567d3640972@cs.arizona.edu> From: David Marchand Date: Thu, 17 Feb 2022 13:46:43 +0100 Message-ID: Subject: Re: [PATCH v2] net/af_xdp: allow operation when multiprocess is disabled To: Junxiao Shi Cc: dev , "Yigit, Ferruh" , Ciara Loftus Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Thu, Feb 17, 2022 at 12:14 PM Junxiao Shi wrote: > > 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 > I just encountered the same issue. Patch lgtm. -- David Marchand