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 A55B8A0093; Thu, 10 Mar 2022 10:42:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 356854113F; Thu, 10 Mar 2022 10:42:02 +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 459854113E 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-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-381-I2LtrbaKNByMimHlQQwD3w-1; Thu, 10 Mar 2022 04:41:59 -0500 X-MC-Unique: I2LtrbaKNByMimHlQQwD3w-1 Received: by mail-wm1-f69.google.com with SMTP id 84-20020a1c0257000000b00389a203e5adso1613451wmc.2 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=hlAjeGBwnW6U83DisTDyE6fwEKDnTnsdSdNWt5P5TE7TYu2mvw0y3mzd/TDVTFPCQs X8wQ6gRHPjacDvP8b14zkTVFXV29AZOJJTVPvOrPeaTMyR3PP2nXRPwuLJ1ON+BecaGc EhfoL11G0jc3TU38bmp698TbqtkSCMUySHkbJ+f+GjwFFHbFECBQkGYvqH5lLDTufIlr 2zQPiUttHh5f9yplbce2y3aeZsyXO2PHL32CdByrGHC3QjeEU1kgx5JB5BGmoBjGNnu7 f424Y5A4wG6XpxDgFblEaQQAUhz+VKDPwIdMZPjqer5tIghESQ+nUoHpOBBacqZbRwEc MM8A== X-Gm-Message-State: AOAM531pzcE1KyAfVkfbY982X7s/QBpG6JRrwHjbIsXnKYaYlEI8zm1D dTkYediXAPEGDTxroWGCg6/p1E1f1CDz0DGPewZ+fcP35FIrzwZRjfS1PrcR6nJQLSic68Mw07I zjkM= X-Received: by 2002:adf:e941:0:b0:1f0:6427:cc69 with SMTP id m1-20020adfe941000000b001f06427cc69mr2817595wrn.345.1646905318127; 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: 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 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 >