From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8F1F3B28D; Fri, 6 Feb 2026 08:36:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.9 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770367002; cv=fail; b=MqvMV0jmPHp5+m9ajnLAypBkhphSZV2H9IVIGoZkLGzeIXSCDol7svneGgelnvPFWIl7lLiAEZdrVS7ZFaKb6N08k4fagHW+Wwx5Lgjx0/LmBul0UjpPQyz2nDiQB/jw0LBAAfNxXJBdn2/BqKSM0+kHjO0839INz08am+VS1B0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770367002; c=relaxed/simple; bh=ta7GzHFHB2yuQt6ypWv43VSGCAt699EObcZYk1m0RAc=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=osnM2QGXesXht+IaisHn22cl7e1WFX+Sik/2E18BVQyEJjBHuTl1qyrqtPWPlWCy41stVS/zxgMjvc3ctXjcRbof6YWr3favs5PlE+QQ/Q7PlxOwAg0WnHpQB/mW/RFRqRtCXaMwX+mOlrBzVN2pqSqTitNx3ebhTyAOm3OX0so= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=i2CA5PzC; arc=fail smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="i2CA5PzC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770367002; x=1801903002; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ta7GzHFHB2yuQt6ypWv43VSGCAt699EObcZYk1m0RAc=; b=i2CA5PzCWP18dLK2fsK4l7OFI9C7AfNCShwlFpqEkkGurhqZ038+EuKb p0T1MTECqxZhs16IKTcLxcqWKXTfHBWUoDiVOEFbOrS413TVr87gDzylK JiSbtXFRI46dDvlXTDuAxs9dkZL4VXdMbyevEFfqJCOPLv1IXGuyqmcCG vRoKo/ecPG/JKq7VaMG1Xg5RtoeZ9Wtd3WiZ1r9OX0BQOybOWTQTsER8Z qHKTd/eLBfpWnNEL4PT9cV/olmrpTOLP80DF5iMA/qqlDnHEn19woUg29 j97DtNOkFE2Xbp9Z0MKLGIkasyAqgfWO4vCIhkAV0FiaHVnMV01Rc9YU5 Q==; X-CSE-ConnectionGUID: v7mzYoKqSsuUvoZsLe8ljQ== X-CSE-MsgGUID: 4wcE002MQCuDd6eATVgvzg== X-IronPort-AV: E=McAfee;i="6800,10657,11692"; a="82310217" X-IronPort-AV: E=Sophos;i="6.21,276,1763452800"; d="scan'208";a="82310217" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2026 00:36:41 -0800 X-CSE-ConnectionGUID: rhQmhHl1QYeQoRXF2+RzTA== X-CSE-MsgGUID: 0ZQajFNVQOC4PZXrr7AQ5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,276,1763452800"; d="scan'208";a="241300502" Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2026 00:36:40 -0800 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Fri, 6 Feb 2026 00:36:39 -0800 Received: from ORSEDG902.ED.cps.intel.com (10.7.248.12) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35 via Frontend Transport; Fri, 6 Feb 2026 00:36:39 -0800 Received: from CH5PR02CU005.outbound.protection.outlook.com (40.107.200.23) by edgegateway.intel.com (134.134.137.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Fri, 6 Feb 2026 00:36:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ExsPs4GI+eh5li+TQn9WmSv7QXxGsTJypRvbFDuPnj1XetSJRyupEeWKB3BuqNmjfa1gYElOFNT1bPm8PCv3mevu1yEyMEQ2uzmXfzEqyhfc8B0wFjvn4DGDd6A3MEKGOcOwv17SeLnO2QKhm2Ysf4Kfe4dnaEWB6BSPFRT7BOb/32lppKIzKmiGdtauPOvs8mFVj6Hq+KgxETMghJ79pSvNAmCKTAzm3SQl0Kibi3RYNk0kxq6Fq0ytjtUSM+mGEpHQYMT+xoJPg/6atTNwlo2/eQFK8LWXhDwysfc7LGiXyPwJ9Fj+I73dSkKFNznFNdRYxr7DJEQd9aixdx85VQ== 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=oaRp100IJCMXfd4ZDPAes7SJr3iKF3KHcJV9ioK8xhc=; b=p0aH3OinFHs1DDetigQgwZ/y/iYHAvMPaX4P6Kr8WtaRCHZUiot9Rommnn1DkZ8rGyp1Ym6NpdmFRKK8HsieSH1xhCSWUPw9Ry0HBqSjfCqnVlBkSY97Xc4tW+ivVEpHuFTqgzPcgx1CLvFWWaSsVIEYHefBkfOq/c+NsmBsxcpL+Y1NYIZ1g6fNaJG6Ly6DvpPNSrWHJH/DWPCPzpmQPCydMDapxUhs3okkPczLrTUXeIBQJYboJC76QRA6Tzmxd9o7JcOuLW/9T5fyfhJaPMkmmKmucj8OKtgcC/YVmrnThiIQf01AVpiF2XeBt3MZHY65yYKHRyBFo4fficcgcw== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) by LV8PR11MB8582.namprd11.prod.outlook.com (2603:10b6:408:1f7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.16; Fri, 6 Feb 2026 08:36:36 +0000 Received: from SN7PR11MB7540.namprd11.prod.outlook.com ([fe80::2edd:5c6d:169c:389b]) by SN7PR11MB7540.namprd11.prod.outlook.com ([fe80::2edd:5c6d:169c:389b%4]) with mapi id 15.20.9587.013; Fri, 6 Feb 2026 08:36:36 +0000 Date: Fri, 6 Feb 2026 09:36:21 +0100 From: Larysa Zaremba To: Jakub Kicinski CC: Vladimir Oltean , , "Claudiu Manoil" , Wei Fang , Clark Wang , Andrew Lunn , "David S. Miller" , Eric Dumazet , "Paolo Abeni" , Tony Nguyen , "Przemek Kitszel" , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , "Stanislav Fomichev" , Andrii Nakryiko , "Martin KaFai Lau" , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Simon Horman , Shuah Khan , Alexander Lobakin , "Maciej Fijalkowski" , "Bastien Curutchet (eBPF Foundation)" , Tushar Vyavahare , Jason Xing , Ricardo =?utf-8?B?Qi4gTWFybGniiJrCrnJl?= , Eelco Chaudron , Lorenzo Bianconi , "Toke Hoiland-Jorgensen" , , , , , , Aleksandr Loktionov Subject: Re: [PATCH bpf 6/6] net: enetc: use truesize as XDP RxQ info frag_size Message-ID: References: <20260203105417.2302672-1-larysa.zaremba@intel.com> <20260203105417.2302672-7-larysa.zaremba@intel.com> <20260205005901.gnju3zmqimtgeu2b@skbuf> <20260204173401.282899d0@kernel.org> <20260205122953.lscemcctayrvszdu@skbuf> <20260205124638.hxzvjiocephzlrk3@skbuf> <20260205134046.pggwyosutj7ggi4i@skbuf> <20260205175408.30ab72a1@kernel.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20260205175408.30ab72a1@kernel.org> X-ClientProxiedBy: VI1P195CA0086.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::39) To SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB7540:EE_|LV8PR11MB8582:EE_ X-MS-Office365-Filtering-Correlation-Id: ff9a766c-50a5-4b96-8165-08de655ad731 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|1800799024|10070799003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ZqdpDkpbDEsdsyhSkopD/i3EtcnE7m8AnJa9Dq+RgqpvGnCNOOpDub6Z4hDI?= =?us-ascii?Q?Czgj0eAgPrLNRFtI/YAgwgIQxBshxkGGDo/IJUHUJkYDcb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H+z3pM6IVhDUtVotjxnpDFg9i2f49fGDxSmVcqT?= =?us-ascii?Q?susTQ01BCHRPrDMsirbYS4/v+KHKLXOB4qO5azQ53KpeS0IVIrRVS0Fh78IF?= =?us-ascii?Q?kUVuq79H4AsmanLzAdnL9irFxk4DEXEm/909HrnvTLr+MuP3AD4DNWc/nrUP?= =?us-ascii?Q?5wy5SzkJ+8vdfwownRzfvdLUg2DnXRfuW1H3lMkFMCIOmZbYysNxeduZ4QBD?= =?us-ascii?Q?ugABSW3Oy2rUHJzA10wDVLZUOXQrhetrt98JVCYkOOA2Fks48NfjrvIs7oOi?= =?us-ascii?Q?s/U7NBTpP6ukh3ORxnZSOrh5eBexRSLWYlMlhqVUe1jmly9YDufLdWFnMmgk?= =?us-ascii?Q?mOPNHjnbXyeCMwmytuG/Y+HtM7CGYF2LY+IvhWB6FnEYxdt9bAoRNk0ZPIZt?= =?us-ascii?Q?MVbPXh5nWG1ytkPG0/q70GJ28BfhZF8cFHKP8KhL69cXIo9FH2eKGggeXE25?= =?us-ascii?Q?DQXAsHoT6D/JXY+C5eLadvxxzGA9PkFQ0jL5/BtzjnkN6s8nzykFimgmcTrT?= =?us-ascii?Q?psqqaIikeNEK16cNFfhxplfjdzVb6xZxFGMOhr5McN+63g7mRD4KM86oS/dy?= =?us-ascii?Q?Zy7DK7oObLu0PRSx6pk=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB7540.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024)(10070799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5u6dh2zHKfjWhUdgJ9GzEgLH5VvjcpD5u7A18jVlAjaDkE/5UH3UBGEhQ9ii?= =?us-ascii?Q?6hJF/R2EK2pgs0MqyGXJkipnxbG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+Ud9E= X-MS-Exchange-CrossTenant-Network-Message-Id: ff9a766c-50a5-4b96-8165-08de655ad731 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7540.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2026 08:36:36.7780 (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: qyRGQf5P2RfJhXu1yousINPJ6Tw9zy7KiKSGtW3nqANAeaza6khYxO/pvzyUd6FfVO3BIusjK0uDvvJo6fnCp4dA/bkX9emC04bf/Ca4E28= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR11MB8582 X-OriginatorOrg: intel.com On Thu, Feb 05, 2026 at 05:54:08PM -0800, Jakub Kicinski wrote: > On Thu, 5 Feb 2026 15:40:46 +0200 Vladimir Oltean wrote: > > > > I mean, it should "work" given the caveat that calling bpf_xdp_adjust_tail() > > > > on a first-half page buffer with a large offset risks leaking into the > > > > second half, which may also be in use, and this will go undetected, right? > > > > Although the practical chances of that happening are low, the requested > > > > offset needs to be in the order of hundreds still. > > > > > > Oh, I did get carried away there... > > > Well, one thing is shared page memory model in enetc and i40e, another thing is > > > xsk_buff_pool, where chunk size can be between 2K and PAGE_SIZE. What about > > > > > > tailroom = rxq->frag_size - skb_frag_size(frag) - > > > (skb_frag_off(frag) % rxq->frag_size); > > > > > > When frag_size is set to 2K, headroom is let's say 256, so aligned DMA write > > > size is 1420. > > > last frag at the start of the page: offset=256, size<=1420 > > > tailroom >= 2K - 1420 - 256 = 372 > > > last frag in the middle of the page: offset=256+2K, size<=1420 > > > tailroom >= 2K - 1420 - ((256 + 2K) % 2K) = 372 > > > > > > And for drivers that do not fragment pages for multi-buffer packets, nothing > > > changes, since offset is always less than rxq->frag_size. > > > > > > This brings us back to rxq->frag_size being half of a page for enetc and i40e, > > > and seems like in ZC mode it should be pool->chunk_size to work properly. > > > > With skb_frag_off() taken into account modulo 2K for the tailroom > > calculation, I can confirm bpf_xdp_frags_increase_tail() works well for > > ENETC. I haven't fully considered the side effects, though. > > +1, also seems to me like it would work tho I haven't thought thru all > the cases. We do need to document and name things well, tho, 'cause > subtleties are piling up ;) Maybe it's time for an ASCII art > for xdp layout? > Yeah, for AF_XDP mbuf in i40e we actually recently discovered another buffer-size-calculation-related issue, so some visual aid would be useful. I will think about how it should look. > FWIW my feeling is that instead of nickel and diming leftover space > in the frags if someone actually cared about growing mbufs we should > have the helper allocate a new page from the PP and append it to the > shinfo. Much simpler, "infinite space", and works regardless of the > driver. I don't mean that to suggest you implement it, purely to point > out that I think nobody really uses positive offsets.. So we can as > well switch more complicated drivers back to xdp_rxq_info_reg(). > As Vladimir has mentioned, if the driver does not use header split, frags will have a tailroom of a size of skb_shared_info, so tail growing does work in practice. Allocating a page_pool buffer (given XDP queue has one attached) is certainly an option, although I am not sure if anyone needs it. Furthermore, growing tail would still fail for a single-buf case.