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 32FAB45BBE; Thu, 24 Oct 2024 08:59:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB1C043378; Thu, 24 Oct 2024 08:59:41 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2051.outbound.protection.outlook.com [40.107.249.51]) by mails.dpdk.org (Postfix) with ESMTP id A1035402CF for ; Thu, 24 Oct 2024 03:57:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OZkkKZ00HVt/uAbEzo1I5qeykouI+/Da6gGmnGZeEUt/bAV+bQHaLMCeU2bQ+5FBBfJMp46/HU5RMcxWhniqq5xjnfgNPEG/zzPkx7W8wFFRoJ/PQIoNa0+145I0M/bHwpuajG8ZULKlxAxQLQpi0RYF7bRPpXuaFVRql5b/DSB/GffZ0uZ3Oyg/P7kbUZRNhahyWKyBcB33ll7ZF8sHUL12VseIz9Ox3dOpH3hvRrc3wYcB1Wyj42J3y+U6hb/QRMzqz/uDWhUjvnDpiiJTk1GTP7tg5GBzmBgPvV81cGDOr4nwAtOIDVUZQ4nqkJJfMFKeyiphOpffoNgOb+YpdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Z9diAyPXNLfu500d3DPkT1hwRNyf9qwFGWAdLA0FWY8=; b=bpqfTgoYNkc2kXZWi7D9fZ8qG6Y9mVdZunR34ldUCB+Ncf5kK0lCB/59TBxOGQPGZ+st3ZGaiCuAuLHljzWnUTU/s8g1EnOJZAL2Vk6+YZAJFbyLvuybNG7ovq1eb6UE2f02UC60rCUcX+LW8q/M2XSzVozDFnh3E0/aO4SDRwmqQ8parykRywz4jfbeW9VabVcXDB6PES1dvhQ5pG6ieK8O3Y/wkzwPliU0mV3fZ5/6+FK7sYx79IAbdKCbJmfTQXBDJyEdYz6CpwK6PPc56uiAcNSY8bxzj/tr9ph4Qlv5eSdFdY2lnQjCorgCzarHeBjaGBk9Ula5bkH/qGVINQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z9diAyPXNLfu500d3DPkT1hwRNyf9qwFGWAdLA0FWY8=; b=T8peXzTjr5lfJ119IyM44uv2AYvqJnwgT9w8CIg5NOjwdWBmi6KKSJJsGI8F7MLLXGbq1UOunWD+Imd23epfFjSnWet3TUShVBWs87ehGEyTXyrBI/9/SJnbMY5KSxK8UEHda8qFg4YCtlfIZLvxk83ZkzYf7wi47kxpGsKqGTYC3/WQ0h1AeCLqFKiAHrJkrBrKIpCPNtTrAIgD5iMD5AGgctZMl9uMEjOTuH6wlQCMTYxmlZy0f/72omWBtxlsuzGFZdYN4kGsnuaMDubCqYJnWvYXLudBn8oDhc5yz979KmI+JITCc4C8c864HajL7zh+JKujjAbO0TRavaA1MQ== Received: from DB5PR07MB9515.eurprd07.prod.outlook.com (2603:10a6:10:48a::22) by AS4PR07MB8530.eurprd07.prod.outlook.com (2603:10a6:20b:4e9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Thu, 24 Oct 2024 01:57:12 +0000 Received: from DB5PR07MB9515.eurprd07.prod.outlook.com ([fe80::765e:2026:9ea2:1c8d]) by DB5PR07MB9515.eurprd07.prod.outlook.com ([fe80::765e:2026:9ea2:1c8d%6]) with mapi id 15.20.8069.024; Thu, 24 Oct 2024 01:57:11 +0000 From: Xiaohua Wang To: Stephen Hemminger CC: "dev@dpdk.org" Subject: RE: Can DPDK AF_XDP PMD support macvlan driver in container? Thread-Topic: Can DPDK AF_XDP PMD support macvlan driver in container? Thread-Index: AdslEWIhrnOJTUtTS/m++PUi3i/7vAAVIqKAABOOyFA= Date: Thu, 24 Oct 2024 01:57:11 +0000 Message-ID: References: <20241023090923.720a849f@hermes.local> In-Reply-To: <20241023090923.720a849f@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB5PR07MB9515:EE_|AS4PR07MB8530:EE_ x-ms-office365-filtering-correlation-id: 9d2d05e7-f293-4fc3-68e9-08dcf3cf2cdb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?CbTtf3zZrpfuQxRYlQEew5O1tpzIrTocWQiuzUxicUMJaTTAI7bnYqNV410G?= =?us-ascii?Q?v19dHnlLJM7Zv+ursr8dlEwT+yW5QKlK1OUzcIE+ciOOD3aTgMgLHd5WYbqa?= =?us-ascii?Q?tTfBg2SLckxtP1l5FUurYQeamhPNXiKEajjovLkJd+PiVnydkkKdOaZ4GLYX?= =?us-ascii?Q?X/VzhhoL5dGLlfqwBiYJhV7MrSfVdA3qHk8/tz1OJoajt85mSnk0aqUGGnBw?= =?us-ascii?Q?f8drHRZfX99nqqxs02fJuZhTyHyc5GL1O520QVUJdVU+zR3Ve0l6DTuqv3ZI?= =?us-ascii?Q?euSxTEHBJG+Y2RSu0F59CsWKvaOMDUk27MRSm1dvtnF8rAWW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vnPYry34Gcps8OfuZbCFfvKTQgRxKq6C6MC+cqLilBib7zl7?= =?us-ascii?Q?W+WVGMTMBCk7TLhIvP6HsumIrU70qxyG2gEvBnZImhC8yoXZGNXgpxbLfwGE?= =?us-ascii?Q?71JiZP64YstMpJrJfYZrZcTi8L1q+q9M4kuZ4xLvB1zEsDMYD/q9e2frVRFW?= =?us-ascii?Q?THHf0pk=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB5PR07MB9515.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ytyw3dshxf+4QqfJaJkMwk8vtS51ai8dpoxa7ttpWfAvt0RvG7ZnZUxadLF0?= =?us-ascii?Q?BMyMXgmBvdHAJSut7ivt6X+H8vj3aV5i5UkA6JwHfgDeoBUjHP2GdGH/mwO4?= =?us-ascii?Q?HLGJR9f83wwele/bPfGKf719otWZnFJHFWR7LhkfbHapbKmtVla5TGfA2xWP?= =?us-ascii?Q?RL4zDbchq0UYzTZjl4wdAhy67aUJmskaiLdELlVWQmE0DZxFENxt/wYvlMA7?= =?us-ascii?Q?QSjbXUbyUgWXevddsElOhOMpI7GSTXrEY3Z1FSK7/GIl3Kxi1NgkyWeImLl7?= =?us-ascii?Q?vV8fX9UrDpkrD6nhzg87Cec5GDsya+3o8XVLLQ/4lr76abfq6rjxVmWWPwRR?= =?us-ascii?Q?aPR8tg4v0F2PkfScrZsy9eRJfX3vpq9tfluW+Z+nEMVURo+BSEAybmuyVWOm?= =?us-ascii?Q?3Kw9eGueMOykfDVTNoZUpi4m8WuGGt3/NiUbpnDGcK7D6fPjiM/H9C3kEnjC?= =?us-ascii?Q?enj0uEVQ+qJC3mfD2hCit+erphGfIrtfDfRTmnFZckBZ+wgIocmnslE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+v+zrIUV5aDU7skyuCqR242/F0XGuIt?= =?us-ascii?Q?foCqwr6L/OLa0AQ5LYqP9SQUdhaqPSqaGk4y6OxeTGljaReKFdaTiaB0tN2q?= =?us-ascii?Q?ML2Pa1707fFqLyxjAvywXbP2OyB6y5mSnIA2LbiZm5lSdeMQjnnwzmpTjywA?= =?us-ascii?Q?/IkWdmwF1fO4G0UGD/zA8AeZFH8PSsyLxXi9HwDd?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB5PR07MB9515.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d2d05e7-f293-4fc3-68e9-08dcf3cf2cdb X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2024 01:57:11.5626 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cLZ4XOsP+baddI0UU9phTF9WWuvgJKOJQqUi/D6XLDnt5x4l4QHjXLb03392+fiyPnr7tiquOGqGTL4ML7zomrfMsrIYckhBYhJoxR/KLfA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR07MB8530 X-Mailman-Approved-At: Thu, 24 Oct 2024 08:59:40 +0200 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 How can I confirm this is a kernel problem? And I added some codes in xsk_configure to set xdp attach mode as " SKB_MO= DE", then the testpmd works fine in this test environment on p1p1 interface= . So, could you add one option to set "xdp attach mode" in AF_XDP Options in = next DPDK release? https://doc.dpdk.org/guides/nics/af_xdp.html BRs//Xiaohua =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D static int xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq, int ring_size) { struct xsk_socket_config cfg; struct pkt_tx_queue *txq =3D rxq->pair; int ret =3D 0; int reserve_size =3D ETH_AF_XDP_DFLT_NUM_DESCS; struct rte_mbuf *fq_bufs[reserve_size]; bool reserve_before; rxq->umem =3D xdp_umem_configure(internals, rxq); if (rxq->umem =3D=3D NULL) return -ENOMEM; txq->umem =3D rxq->umem; reserve_before =3D __atomic_load_n(&rxq->umem->refcnt, __ATOMIC_ACQ= UIRE) <=3D 1; #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG) ret =3D rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve= _size); if (ret) { AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n")= ; goto out_umem; } #endif /* reserve fill queue of queues not (yet) sharing UMEM */ if (reserve_before) { ret =3D reserve_fill_queue(rxq->umem, reserve_size, fq_bufs= , &rxq->fq); if (ret) { AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n"); goto out_umem; } } cfg.rx_size =3D ring_size; cfg.tx_size =3D ring_size; cfg.libbpf_flags =3D 0; cfg.xdp_flags =3D XDP_FLAGS_UPDATE_IF_NOEXIST; cfg.bind_flags =3D 0; /* Force AF_XDP socket into copy mode when users want it */ if (internals->force_copy) cfg.bind_flags |=3D XDP_COPY; /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dnew added cod= e =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D*/ const char *env_xdp_attach_mode; env_xdp_attach_mode =3D getenv(XDP_ATTACH_MODE); if (env_xdp_attach_mode) { AF_XDP_LOG(INFO,"XDP attach mode enviroment variable is %s.= \n", env_xdp_attach_mode); if (env_xdp_attach_mode[0] =3D=3D '1' && env_xdp_attach_mod= e[1] =3D=3D '\0') cfg.xdp_flags |=3D XDP_FLAGS_SKB_MODE; else if (env_xdp_attach_mode[0] =3D=3D '2' && env_xdp_attac= h_mode[1] =3D=3D '\0') cfg.xdp_flags |=3D XDP_FLAGS_DRV_MODE; else if (env_xdp_attach_mode[0] =3D=3D '3' && env_xdp_attac= h_mode[1] =3D=3D '\0') cfg.xdp_flags |=3D XDP_FLAGS_HW_MODE; else AF_XDP_LOG(INFO,"XDP attach mode enviroment variabl= e shall be 1 or 2 or 3.\n"); } else { AF_XDP_LOG(INFO,"No XDP attach mode enviroment variable.\n"= ); } /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dnew added cod= e =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D*/ -----Original Message----- From: Stephen Hemminger Sent: Thursday, October 24, 2024 12:09 AM To: Xiaohua Wang Cc: dev@dpdk.org Subject: Re: Can DPDK AF_XDP PMD support macvlan driver in container? [You don't often get email from stephen@networkplumber.org. Learn why this = is important at https://aka.ms/LearnAboutSenderIdentification ] On Wed, 23 Oct 2024 06:07:22 +0000 Xiaohua Wang wrote: > Hi, > > dpdk-testpmd with AF_XDP PMD can't work on p1p1 (macvlan) interface, but = can work on eth0 (veth) interface. > > And is there a method to enable AF_XDP PMD to work in XDP SKB mode? Or ad= d one option to set "SKB mode" in AF_XDP Options ? Maybe a kernel problem not an issue directly with AF_XDP PMD.