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 B7D23A0093; Thu, 10 Mar 2022 09:49:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC4704113E; Thu, 10 Mar 2022 09:49:56 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 9B132410FC; Thu, 10 Mar 2022 09:49:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646902195; x=1678438195; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=GDq48/yY37fcFqY94CzH8m0yXi+oosRwIjEGh65eJ5w=; b=L1IQOFJQ0o9EKeADkeHko1nRLsP6G5aSVbf6WmytbW0eNezRKLTn0o5L LwK6PSOWGpf63jM1gvZbC2KCGuXL4f1xA94nlBtk2KDotE+8nKOFXxNSC Qf3iQec3Hjckrj3IiikpsawvtdjIoAR52WVNWg+uduWNHplyor3MSj+sa HkYONX1xnMJ9RjKwGyrG2qCwYshqOe/d91PAFKN0a0q32L8VXR6pJ1tgS 7xwJH9slp98RC70T9vXv2rw3SpSqEzHe22l0zM74BJl2oSlfBBBjP4Z/S GNYmaHZGsg41EfsAYOplheH9xJPS7StxYCsO0zHyVrEXyAsmxOKgWN9ul w==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318420591" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="318420591" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 00:49:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="642477445" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP; 10 Mar 2022 00:49:53 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 10 Mar 2022 00:49:52 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Thu, 10 Mar 2022 00:49:52 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Thu, 10 Mar 2022 00:49:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g77LioGcRIz0b6X5l5lA/Dlvw3jC9S8FC5jp4x/w6UEVfV/1h5uhDQuCGGSDC29fAud6ekfWx1vtuVSx24bHxDxPW5JK2G+GYREUC5j9RMKUVjNCITkng2+WBO45PD+mAW5ZUa+b6bXh7QddH2DiaZb9BF7g7tjGSQJXsylWsKO24qvSQfMweTAXuw/VhOT/bddfOzs6ueZQpGC7Ck4uFxmoejeQSwWu9Wy4C5qJB70LyY43zSrTl8pmn3IBqzKVMj2FY1VZa5mDlWYUE7bp57oOnjS+5G7/b6KAQwNjD9Ti9zuIjArKgyu8FYml6E3te1DWWSap3+pdRfOYRwwB7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4Db1pCPNADmBU0dJS3H0jQwXwlsAZddPfjJGTLpSIY4=; b=F78lbuIxYqREzQe/zGDUPmcUdW0eL3QMJ/Twt/dRyd/Om6Z0h07logCG5OtUU++6AR/n16qsts+4hE9u+TkgCijtSdkphZugXKGZ/hU7bgDqzWVyNfcCiv3BZ3M5KyTbfezgsTwAPKNlNFV1+CCYzMvUELMdQHnF8gFSt3fcNQhb2lYN46ld/hYIR7MFKMu67xdZT0f9sZin9Ut8/+aoW2Qc0njIPGYEjN2k9cADDx8WERGZm83tx1lpgb4CFkfBlpNjLpwC+28gkIN6huWAcCw0Nw5zDlVaOUNUHR6R5rom/Im2vTVVeem+ygNGjht6Asv0jTrjQ8FERJ3Q270Wlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH0PR11MB4791.namprd11.prod.outlook.com (2603:10b6:510:43::10) by BN6PR11MB4019.namprd11.prod.outlook.com (2603:10b6:405:78::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 10 Mar 2022 08:49:50 +0000 Received: from PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::10f6:8907:d46c:78d8]) by PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::10f6:8907:d46c:78d8%7]) with mapi id 15.20.5038.027; Thu, 10 Mar 2022 08:49:50 +0000 From: "Loftus, Ciara" To: Junxiao Shi , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH] net/af_xdp: fix custom program loading with multiple queues Thread-Topic: [PATCH] net/af_xdp: fix custom program loading with multiple queues Thread-Index: AQHYM/1ATVFVURhk/0q5EfF+QlSH/Ky4TxvA Date: Thu, 10 Mar 2022 08:49:50 +0000 Message-ID: References: <2c42e3e23c18fd60@cs.arizona.edu> In-Reply-To: <2c42e3e23c18fd60@cs.arizona.edu> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 31114b38-a044-422e-1c7b-08da0272f01b x-ms-traffictypediagnostic: BN6PR11MB4019:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WGZ78QDj3xSPkMaxr7mdlIpqEeKuW9o1rNKq8j7Bd9i8qMHrVp7/gV1uHoSbPlsredt+ZKSK/vomS9jGLVP1rp+glZdfiTH37R+5a/cQ0MOao6MDQ00hHLphQE1jxfrJZtoBU6S2XEjKxi6K/ZjXCINUK/MtxeImCdo8aZIysLfGWdb8vJMH/zVtdWsYzPPJ/bymj0Q1/R2nrRTsxVuYzcPecHMJjdTF4XKkbvmz7DfZzUjrkSbBokoxODjZaKeVvfJeZfnWGumH07RGWrAaiTwPtkK6J5FiypuTfYdmCCsfTvETP48Swuwzs5rrau652PphdvC5bZIVJWJ4WtlHLAXwY8AV0C5fbt+RyWsLR0zsYDagrSPh+9OAuk9jWZb4FeCBYPRDAOkROBRSovBUxBXHSk69YhsW2eU0cf6ODXCgWy10RJvrAUeAAqc8SBGPCqwgepz+TFYYTeU88McjDaCMM9oXnDDr8ZpRK+Y8Bc6RNkHRxlsLb/6rnx96+ANtAl1LqSydzoaQ/oWkNjNkTU89aTorplxakbzK1IrSJVdbL+4EjPwerOT83k/iZK6CvdJb4fNkyfa0Y6/lRn8RFFe8GyBxn9itjsQePHh6WNNd/NhtGOxcSE9qYgwDRZ+wRlBJ78suuQN89i6pZbqHQIPvJwOXKUYo/9GsDJ1BfppV60eBVb7h6g3w0EHZHNrm4CAGx4Ku3a6ry8PeEX2kNA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB4791.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6506007)(7696005)(33656002)(8936002)(52536014)(66446008)(508600001)(5660300002)(86362001)(9686003)(38100700002)(2906002)(26005)(76116006)(186003)(4326008)(64756008)(66476007)(8676002)(66946007)(66556008)(82960400001)(110136005)(38070700005)(122000001)(55016003)(316002)(71200400001)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ckUS+o1KdvHho+cnQrjRe7lfmlLRlRcTMLeTxqTJQbwZpAQdSj+eKjeJ0XDv?= =?us-ascii?Q?jpdJRACGZ/hU6/YuZJH7mRzRLYBY1mGW91pclmkR8r6p2kqfCxgpT2rCfCnF?= =?us-ascii?Q?c86n7agIJ2mr00HD+oNA7/505wmCFbZ0ltnx/JdoBL5eH0ajUXjkmh3GcV6v?= =?us-ascii?Q?byCZWQCE/T8eY20ygAacypDDqfUwlQYWvBaMoI6lP2Jt9bL3/VE3SKQO6JWA?= =?us-ascii?Q?1tzzbqTt7rk8OKBx9mDIFuc47ur2dgP5oH2xfWbJ+c9q5Z2UV12iNSrk5n5Q?= =?us-ascii?Q?HYDyyg1qF9p7o/Sf5T3jB4RQsTEu4EiZHdvnnVZhYGcybla0vAPvnadixWxe?= =?us-ascii?Q?+UB/EtUq5yEv1qF/RgOWRUEiF3x2xzgYRLodCJHsbWjQ9aC5oXXrXME48A/n?= =?us-ascii?Q?g1A1kc0chwjFdUUK8OUBO98dLap22CRcqT4ZlN15Ghc4fP/wVLfas4LmH9Vd?= =?us-ascii?Q?9xKHu2w1JtHiMtToR+0WSdUnFUT+TddM7WXCqRlisSzJOhLc3M/fWRgBSVUe?= =?us-ascii?Q?BbMa1Fv/mk+qLErEe7OyQKYVsP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=?us-ascii?Q?SWYWDiuEYK/okHgUgh/7nhuBrbI4H2PRcpfecyHCJgimOuOihhObpgjsSBGW?= =?us-ascii?Q?D5nitxSmF7PPJWgBeOV4BlupE19j1KoW+RaAkyL7NbxYVkEC+C1ma+XiNeYn?= =?us-ascii?Q?wR739jyEttMCZUfaolYqDfSFA+5fw5+vnsEWqBaYFgDteTdc1xYb+ki93fzB?= =?us-ascii?Q?lQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4791.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31114b38-a044-422e-1c7b-08da0272f01b X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 08:49:50.3245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hY5IUWGeZAlZ48vORo/rTlTLrXYHKAiF4rv/qZ8bmgeBdiWFBLLPPbKrSEBKHItdamrosO0RzDaWTMPLaq/r2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4019 X-OriginatorOrg: intel.com 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 > 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. >=20 > 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. >=20 > Fixes: 01fa83c94d7e ("net/af_xdp: workaround custom program loading") >=20 > 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. Acked-by: Ciara Loftus > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) >=20 > 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 |=3D XDP_USE_NEED_WAKEUP; > #endif >=20 > - if (strnlen(internals->prog_path, PATH_MAX) && > - !internals->custom_prog_configured) { > - ret =3D 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 =3D 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 =3D 1; > } > - internals->custom_prog_configured =3D 1; > - cfg.libbpf_flags =3D > XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD; > + cfg.libbpf_flags |=3D > XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD; > } >=20 > if (internals->shared_umem) > -- > 2.17.1