From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B75EF1339A4; Fri, 9 May 2025 01:28:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746754139; cv=none; b=j/TySeQZqBeSRdKIC+8HyUiyFmIoGt8IfWGFHPqo92PaKZ7I63tT4K4ieix24gJ/ozXd55Ee3cxfWgNvpjs6Eb45X59co3B56i43LwVk9hWCreCGbY+Ahs9ltXK2td02JLFoz5AWxWoVQrIhPaqwx+zGARaG2ncaFhRp3LlZoWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746754139; c=relaxed/simple; bh=0WX7lzNhoLFaeUZOspWAuZsL5pC/FLkw1kJVG5zFX4g=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=F3KPGYIxtGMOeqpUw8xuxqPFA+rGROLH1ViWeagBieT41KZ1v6ITlHWfhFtmEPLj+a/lnsvHbljKxxZLI75iwOPyxge1B22Otd/ZjZ7Us/aBKeDnR7V8XLj3kxbJsBhyuPOcq/F/1EJwPgRpCgehoYZHZf+yWrI8iVVO1xBSktE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nNLRLSjk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nNLRLSjk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B521C4CEE7; Fri, 9 May 2025 01:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746754139; bh=0WX7lzNhoLFaeUZOspWAuZsL5pC/FLkw1kJVG5zFX4g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nNLRLSjkdMcghiY1dVm9t8X+FLaMwq/+/ytJfE38Y5mo9zG77oUcYCnNrTdCicYeK EAxmxfdNh9r1FBOEECYpNWlKVT6MzrnoEmLPuDNDbowb5LprQSL8DGA7Z5x+CszCoE NG8Je+SJkN+YCPlZEiCSkP92pyXDtmsWvVxC2Xsjc4nwTQNkXD5aYhC/RaRzaHm1id ES5jis2R6cy79IjionLUvPNlfEb+0KxbR6OVbN+Hiot+XZ2bibaXjYLObZ5o1Rb/SR M0gpEWtb8YccuNvLoC/99ELt6RBFTQpS6fZhHiDMU7Khsu9TYmRWc5F9/q+xF75fVE QhICrhizMW5Ww== Date: Thu, 8 May 2025 18:28:57 -0700 From: Jakub Kicinski To: Jon Kohler Cc: Jesper Dangaard Brouer , Willem de Bruijn , Zvi Effron , Stanislav Fomichev , Jason Wang , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Simon Horman , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bpf@vger.kernel.org" , Jacob Keller Subject: Re: [PATCH net-next v3] xdp: Add helpers for head length, headroom, and metadata length Message-ID: <20250508182857.2b60301e@kernel.org> In-Reply-To: <2121D2EF-E554-4DCB-BB6A-93FB3975B064@nutanix.com> References: <20250506125242.2685182-1-jon@nutanix.com> <681b603ac8473_1e4406294a6@willemb.c.googlers.com.notmuch> <062e886f-7c83-4d46-97f1-ebbce3ca8212@kernel.org> <681b96abe7ae4_1f6aad294c9@willemb.c.googlers.com.notmuch> <6FF98F38-2AE5-4000-8827-81369C3FB429@nutanix.com> <20250507171829.3e8f8a76@kernel.org> <2121D2EF-E554-4DCB-BB6A-93FB3975B064@nutanix.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 8 May 2025 03:19:42 +0000 Jon Kohler wrote: > >> I like xdp_linear_len() as it is descriptive/clear. =20 > >=20 > > FWIW I don't feel strongly but my very weak preference would be=20 > > not to merge this. I already know I'll be looking at the definitions > > every time. Is it obvious to everyone in this thread whether "headroom" > > includes the metadata length? It's not obvious to me. But the patch > > seems quite popular so =F0=9F=A4=B7=EF=B8=8F =20 >=20 > Jespers suggestion to have a DOC: on this hopefully will be helpful. >=20 > I=E2=80=99ll try my hand that that and see what sort of trouble I can get= into I hate to dwell since I already said I don't feel strongly :) but the doc is orthogonal, it helps people who don't understand the geometry to understand it. My concern was that I understand the geometry, but now I will also need to remember what we decided to call "headroom" since (unlike skbs) XDP has all sort of stuff packed in front of the packet data :)