From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by mail.toke.dk (Postfix) with ESMTPS id 22989A19270 for ; Wed, 12 Jul 2023 22:09:58 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=WoivpREr Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 98618618FE; Wed, 12 Jul 2023 20:09:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 339B2C433C7; Wed, 12 Jul 2023 20:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689192596; bh=0tjYlRq1YbzrHKoKvcbNWiR3wUPzfcuxoNmZjxC+l0I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WoivpRErrsDBluPlX0jY/8PXOX9W2WlcAfkRrWPswNJ3agrzwqTdLAvC+zm8oeNHT 4pOE4jkvhsDTW+0UxRHaPFWt4K9s7KWvAfSuFDPel4vc7p8v357d35BdUJUL/93e0S AALRkqGCohFV82lVKFvTdOf5a+WHG/v5BKjZLJ/fKDrW4v5tYYo7gAXqg+7LBCkAP8 07Gx7sLQsGZ4PHE8RlKaheARxZkLovxMf+dQuhj8CCkjCYlSPJiZtbPoJrAonx4xEa /+J3ssCBRM2PeKnrDzeWHjQFNmrWZrZe6NuXqCN/D6BnX/TBceKkTqJ97bI4ODdKCM m1ZHUB2koNP0w== Date: Wed, 12 Jul 2023 13:09:54 -0700 From: Jakub Kicinski To: Alexei Starovoitov Message-ID: <20230712130954.7c8dc5ef@kernel.org> In-Reply-To: References: <20230707193006.1309662-10-sdf@google.com> <20230711225657.kuvkil776fajonl5@MacBook-Pro-8.local> <20230712190342.dlgwh6uka5bcjfkl@macbook-pro-8.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YNPWOA5J3OBIN2MAS7BEII27SZ3PEJDZ X-Message-ID-Hash: YNPWOA5J3OBIN2MAS7BEII27SZ3PEJDZ X-MailFrom: kuba@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Willem de Bruijn , Stanislav Fomichev , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , Toke =?UTF-8?B?SMO4?= =?UTF-8?B?aWxhbmQtSsO4cmdlbnNlbg==?= , Willem de Bruijn , David Ahern , "Karlsson, Magnus" , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , "Fijalkowski, Maciej" , Jesper Dangaard Brouer , Network Development , xdp-hints@xdp-project.net X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [RFC bpf-next v3 09/14] net/mlx5e: Implement devtx kfuncs List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 12 Jul 2023 12:42:35 -0700 Alexei Starovoitov wrote: > > Basically, add to AF_XDP what we already have for its predecessor > > AF_PACKET: setsockopt PACKET_VNET_HDR? > > > > Possibly with a separate new struct, rather than virtio_net_hdr. As > > that has dependencies on other drivers, notably virtio and its > > specification process. =20 >=20 > yeah. Forgot about this one. > That's a perfect fit. I would reuse virtio_net_hdr as-is. > Why reinvent the wheel? > It would force uapi, but some might argue it's a good thing. I was gonna reply on the other leg of the thread but it sounds like we're in agreement now? =F0=9F=91=8F=EF=B8=8F virtio_net_hdr is the kind o= f generic descriptor I had in mind. I'd suggest breaking hdr_len into L2len, L3len and L4len, tho. How does virtio do IP length updates during TSO if it doesn't know where L3 starts? HW will want to know, and it's easy to add them together in cases where it doesn't. Which is why I kept saying "packet geometry" rather than pointing at virtio_net_hdr.