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 20DE7A00BE for ; Thu, 10 Mar 2022 10:42:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1597041147; Thu, 10 Mar 2022 10:42:03 +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 49DF64113F for ; Thu, 10 Mar 2022 10:42:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646905320; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKoISJa+ALrFPcV/gN0qtiF1RTDW0+Hi8mjLIzdDQbY=; b=fNTc7hdeeiBs5mr02k05H7Y7MpeokRq3Ct5DUe/jwQexHnDMSx7gO38e1uWJtTW4RCqr4m +diWt46nIA9V9URNEOmYfIycEg548O7tKwv87ONJGngwCFnPL6M24+lL9Sasi/9mvasZqY 1e3d9rb3KcB/2jirfyZhP5KsJA4oTOI= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-381-v9Fg9LSPMdWP7khGYdgGBA-1; Thu, 10 Mar 2022 04:41:59 -0500 X-MC-Unique: v9Fg9LSPMdWP7khGYdgGBA-1 Received: by mail-wm1-f70.google.com with SMTP id v67-20020a1cac46000000b00383e71bb26fso1920020wme.1 for ; Thu, 10 Mar 2022 01:41:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=RKoISJa+ALrFPcV/gN0qtiF1RTDW0+Hi8mjLIzdDQbY=; b=eLUaNYr8S+kf7IjDtnY3tnsgTWVyXjR0YHgVm7eLhI1UxbY2NehJtYIjwt7daSlHb4 lps22cmpUTSU3kXGyF3MHg8Gyp3psQh6m4eXPda7130GnAQDHOxq5oMarwhi5XV/uKDj dHfxxQKkGj1hASyx9frkLtSATRq1cw3u5SKUO1c74H2HWQ/jJLSv5k+NoZD8/Qvlj7rx qQusPtaxvjU/kuAEKKhyaX+hjeqEdSs34ZkTVus1ct/rF1H0FyAzcmUVv97x5+7ZtKXK H3yCnUdH142zT/BKzETp1hN1fBhft3ETimMnKblW3ngSV4nk39HfeUnC71UL4yxyRimZ fqjg== X-Gm-Message-State: AOAM5316XMISaAMUDKht+kUTRRb4VAVAZ9TzHxVmoIZVhZaOJsa3qS4U Df5q1J9pnxqYOlB/2NnZc7f0ykj0HlXQw3E9bVHi5aGqlgUvrr3VhfKM8cmmm/nFhIzm721cp9g IxB4fjBM= X-Received: by 2002:adf:e941:0:b0:1f0:6427:cc69 with SMTP id m1-20020adfe941000000b001f06427cc69mr2817604wrn.345.1646905318198; Thu, 10 Mar 2022 01:41:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzy7+y3HteWtEnGCH3f0CuiG2G6LJwOAPHaF0Gwcb+vGxZPSouxhX3ICKnZLsXSA5/4GyKB6w== X-Received: by 2002:adf:e941:0:b0:1f0:6427:cc69 with SMTP id m1-20020adfe941000000b001f06427cc69mr2817582wrn.345.1646905317906; Thu, 10 Mar 2022 01:41:57 -0800 (PST) Received: from [192.168.0.36] ([78.18.17.201]) by smtp.gmail.com with ESMTPSA id h12-20020a5d548c000000b001f1f99e7792sm3603491wrv.111.2022.03.10.01.41.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 01:41:57 -0800 (PST) Message-ID: Date: Thu, 10 Mar 2022 09:41:56 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: "Loftus, Ciara" , Junxiao Shi , "dev@dpdk.org" Cc: "stable@dpdk.org" References: <2c42e3e23c18fd60@cs.arizona.edu> From: Kevin Traynor Subject: Re: [PATCH] net/af_xdp: fix custom program loading with multiple queues In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Hi Ciara/Junxiao,, On 10/03/2022 08:49, Loftus, Ciara wrote: >> When the PMD is configured to load a custom XDP program, it sets >> XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag to prevent libbpf from >> loading its default XDP program. However, when queue_count is set to >> greater than 1, this flag is only set for the first XSK socket but not >> for subsequent XSK sockets. This causes XSK socket creation failure. >> >> This commit ensures that XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag is >> set for all XSK socket creations when custom XDP program is being used. >> >> Fixes: 01fa83c94d7e ("net/af_xdp: workaround custom program loading") >> >> Signed-off-by: Junxiao Shi > > Thanks for the patch! > It's probably too late to make it into 22.03 but cc-ing stable as it should be backported to 21.11.x. > 21.11.1 will take backports from 22.03. So it will be in a later 21.11.x release if it doesn't make 22.03. Please add the 'Cc: stable@dpdk.com' tag in the commit message. Kevin. > Acked-by: Ciara Loftus > >> --- >> drivers/net/af_xdp/rte_eth_af_xdp.c | 23 ++++++++++++----------- >> 1 file changed, 12 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c >> b/drivers/net/af_xdp/rte_eth_af_xdp.c >> index 65479138d3..9920f49870 100644 >> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c >> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c >> @@ -1307,18 +1307,19 @@ xsk_configure(struct pmd_internals *internals, >> struct pkt_rx_queue *rxq, >> cfg.bind_flags |= XDP_USE_NEED_WAKEUP; >> #endif >> >> - if (strnlen(internals->prog_path, PATH_MAX) && >> - !internals->custom_prog_configured) { >> - ret = load_custom_xdp_prog(internals->prog_path, >> - internals->if_index, >> - &internals->map); >> - if (ret) { >> - AF_XDP_LOG(ERR, "Failed to load custom XDP >> program %s\n", >> - internals->prog_path); >> - goto out_umem; >> + if (strnlen(internals->prog_path, PATH_MAX)) { >> + if (!internals->custom_prog_configured) { >> + ret = load_custom_xdp_prog(internals->prog_path, >> + internals->if_index, >> + &internals->map); >> + if (ret) { >> + AF_XDP_LOG(ERR, "Failed to load custom >> XDP program %s\n", >> + internals->prog_path); >> + goto out_umem; >> + } >> + internals->custom_prog_configured = 1; >> } >> - internals->custom_prog_configured = 1; >> - cfg.libbpf_flags = >> XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD; >> + cfg.libbpf_flags |= >> XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD; >> } >> >> if (internals->shared_umem) >> -- >> 2.17.1 >