From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by mail.toke.dk (Postfix) with ESMTPS id 4C91E9C4636 for ; Mon, 21 Nov 2022 20:41:32 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=njnm/vfP Received: by mail-oi1-x234.google.com with SMTP id n205so13603416oib.1 for ; Mon, 21 Nov 2022 11:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=K3eSnfUNfCF8VEUfrvOhaQJeZjovtmcW6nKUCmGcdRQ=; b=njnm/vfPQCUbblxZgxMqyKcAEgZslS33ZpMvRNoNtGdlQV5cMA2cVPt3b19v5IGBOK JIsrZOBdz+sawKaeBq2QaL9CpoDq1XFsRAQ9wk+is2JdTzuVC46Qt/MqwdT0oxeZpech zQzhttp7JZksFQTSfAqfLeilvKCrU9xey7206MC3D4oa+Q6mnfnoJlhnq6rKLGvTm15a AE3tzj1hc/DZmHRZn7JoyFPz7XfI3tU51ZLiEJzhmZpJbitENe8rnjY/k8DQ+JO1Isok eeR0DZOxKuOEPRjOGgfKt+GofgyQ13TSua87+L6XRdJECsC9gT1mHDFmSVKV3oL7tpsD hj0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K3eSnfUNfCF8VEUfrvOhaQJeZjovtmcW6nKUCmGcdRQ=; b=6HuvQvqMyc3IxhB2pyeGGMEIuRpWgipyizKWbQjOZ0Rpq2HveGZ7mt3Aqev6Fw20wZ IpdNjzWdosoGtk9tLH/oFR3fQaN+GeAp9cldrGICkMEsCqeE0ioW7I0EKOH1RGW2bcQ9 uYOg69PgNhkdaiTnsbIB4H7vCNSb0x5T5DHiQzJnbBDG9NIBxUKsh6YyelwuIIIPeEZe UdLcBYQYm+HIhWi4YJrhIzBtoXQ/+93TeIHao9L25M+fmbH36+pX0izTUqW4KWVG6FU8 +VGhJfoUyRotci1L9SNHz+1mmOZk8L2uMuV5L73K4mvmTGkMMZ+Rq8JzJlR6JyFweb7b NWpg== X-Gm-Message-State: ANoB5pl2hS85mqYwRVvz+tez7Dns/B5NEj/1e7fw2YZY+eJto4/H+TIz /IzMQO2RxcK5wiX7tiv1gjvuTVWJvgdj9d2OtPQynA== X-Google-Smtp-Source: AA0mqf6sxAMT58ZxIrRzLd5B4NdbURNGFcWqmkWrWvMtzXfjHo5xbsq6uJHtfjOrnwB69fg95TSJrFlKGHpKeeOgbQU= X-Received: by 2002:a05:6808:f09:b0:354:8922:4a1a with SMTP id m9-20020a0568080f0900b0035489224a1amr14866oiw.181.1669059691038; Mon, 21 Nov 2022 11:41:31 -0800 (PST) MIME-Version: 1.0 References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> <871qpzxh0n.fsf@toke.dk> <20221121104744.10e1afc8@kernel.org> In-Reply-To: <20221121104744.10e1afc8@kernel.org> From: Stanislav Fomichev Date: Mon, 21 Nov 2022 11:41:19 -0800 Message-ID: To: Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: QSYYEXKO45BANMLTGR5ONTG4VWZGSCNG X-Message-ID-Hash: QSYYEXKO45BANMLTGR5ONTG4VWZGSCNG X-MailFrom: sdf@google.com 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: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , 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, Nov 21, 2022 at 10:47 AM Jakub Kicinski wrote: > > 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? SG! Let's get back to it once we get the basic rx metadata sorted out. I'll probably look at the tx part next though; that xdp->skb path is of least priority for me.