From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by mail.toke.dk (Postfix) with ESMTPS id 107B69C4602 for ; Mon, 21 Nov 2022 19:47:48 +0100 (CET) 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=MLlsidWW Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2C32FB81233; Mon, 21 Nov 2022 18:47:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AFB3C433C1; Mon, 21 Nov 2022 18:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669056465; bh=2EAmo31DRcbW9roq/lO6oXvVayYGbusj5GgryFsWecM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MLlsidWWufNRyI2lwtmGAwsvcCUK6tVMLpaeklOeeXeEMgw983krUJv/7Av6C4WB4 s0BZRdRFIUzfolIXifCKCVs/AVeBeSChpCnnBy50WD58jwhwzpAmB+RW7gF9fQeHhO tywu/bnO8Te618SZboquJErEpGwZa6jg3yvP+8XCS2xlEeR2MLOj4zPMmB5SWWPvmn VZbXLYTCIP/TAymRJ1UbM1d2jNJC+Z8pTfgocITB7bVTJpe+H06CY6SBjmHBUzHWAh CLf2+2JzOSg37dbSvWZp8gVKiIatpcJJs//HpSDvWVjREHVDNuXBJlZtIbPuFVbg73 F2XnYGAN1Szkg== Date: Mon, 21 Nov 2022 10:47:44 -0800 From: Jakub Kicinski To: Stanislav Fomichev Message-ID: <20221121104744.10e1afc8@kernel.org> In-Reply-To: References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> <871qpzxh0n.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 4TX6NJ7BFD7GZ4VW2K3EDREXCXGJXSYO X-Message-ID-Hash: 4TX6NJ7BFD7GZ4VW2K3EDREXCXGJXSYO 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: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Jesper Dangaard Brouer , bpf@vger.kernel.org, brouer@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Willem de Bruijn , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org X-Mailman-Version: 3.3.7 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next 06/11] xdp: Carry over xdp metadata into skb context List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 21 Nov 2022 09:53:02 -0800 Stanislav Fomichev wrote: > > Jakub was objecting to putting it in the UAPI header, but didn't we > > already agree that this wasn't necessary? > > > > I.e., if we just define > > > > struct xdp_skb_metadata *bpf_xdp_metadata_export_to_skb() > > > > as a kfunc, the xdp_skb_metadata struct won't appear in any UAPI headers > > and will only be accessible via BTF? And we can put the actual data > > wherever we choose, since that bit is nicely hidden behind the kfunc, > > while the returned pointer still allows programs to access it. > > > > We could even make that kfunc smart enough that it checks if the field > > is already populated and just return the pointer to the existing data > > instead of re-populating it int his case (with a flag to override, > > maybe?). > > Even if we only expose it via btf, I think the fact that we still > expose a somewhat fixed layout is the problem? > I'm not sure the fact that we're not technically putting in the uapi > header is the issue here, but maybe I'm wrong? > Jakub? Until the device metadata access from BPF is in bpf-next the only opinion I have on this is something along the lines of "not right now". I may be missing some concerns / perspectives, in which case - when is the next "BPF office hours" meeting?