From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.toke.dk (Postfix) with ESMTPS id 399C49C2AFA for ; Wed, 16 Nov 2022 10:30:46 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MRBnH82/ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668591045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WhwvXtJ+QlvItPTzYw/ZocGWMuy4LEUWdgmdV2EYwVM=; b=MRBnH82/1BC1G2tKOPf8Dz58Xi8pjInRebxJukmKW/T9a6FedPPmYI7Ut90aUUCWo3psiP tG8MpQkEbpQuHp2J8FEucQcDwJp23a3vs7WRJPC8fMiTtdY3JJcndK8gzDNH+ixOMdnBaH x+dtK2ru/tHdcx54QR4b3/49duApmlE= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-438-FGbCUTLsOK2Y25jyX0PGUQ-1; Wed, 16 Nov 2022 04:30:44 -0500 X-MC-Unique: FGbCUTLsOK2Y25jyX0PGUQ-1 Received: by mail-ej1-f70.google.com with SMTP id qf25-20020a1709077f1900b0078c02a23da3so9288396ejc.0 for ; Wed, 16 Nov 2022 01:30:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WhwvXtJ+QlvItPTzYw/ZocGWMuy4LEUWdgmdV2EYwVM=; b=0I4ZFUIH2SSlOPN7tTojyUGRyooxVSXkVv65PdMzcD2aKhuEjMpkyrJCq6C+NOCy7A ahtMvxpyiGETcqjqm6ICSxzIDkdMFkGfkUljiy7WBCJVa+sRghyaarJ8qXx0ipeSC6o4 3tcguv+2z0fGlWMTcZNVLbJ2NxEekZ4d2kYC/snW2WvD4v9m6ZBZ+bcjMaW5GaGPQDKR mszDqbAPGwah5i3hHOYadzcCGXYta75ceilcuUi/zVAWMyVBf+b8t/NI1I/y8sOKeCSn +wYwmvDfwo9nxtMUKKINWfyPxbxTwQG8lS8nHb8UaDb4+g0hYgL4fEOO7ewCKyf7e+GI sLsA== X-Gm-Message-State: ANoB5pmBrvgzsWD2JCGgjmYCLHlw96tXYnJC33drtaz8NSsokpedDkr1 P+qKnNgpUVlTVnRL9cIhsv7axPQpuCDaP+nO+P1vypRyN9IQ365LyIjhGl0qX/BN+AjhknqN+Wn 9anK67N9VjedwrAGtSOyd X-Received: by 2002:a17:906:2455:b0:78e:975:5e8 with SMTP id a21-20020a170906245500b0078e097505e8mr17150945ejb.82.1668591041504; Wed, 16 Nov 2022 01:30:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6T1/jKcStjc+60rFRbavpAvp0ivA59pr9JzV6Scum80n8WSSt2rPa46uwIMpai3PeScl5OTw== X-Received: by 2002:a17:906:2455:b0:78e:975:5e8 with SMTP id a21-20020a170906245500b0078e097505e8mr17150849ejb.82.1668591039899; Wed, 16 Nov 2022 01:30:39 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id l2-20020a170906a40200b007b265d3f6a6sm1870230ejz.162.2022.11.16.01.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 01:30:39 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 8FEDA7A6DCD; Wed, 16 Nov 2022 10:30:38 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Stanislav Fomichev In-Reply-To: References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> <87wn7vdcud.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 16 Nov 2022 10:30:38 +0100 Message-ID: <87fsejjlfl.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IPCQWBNV4VBZ2Y46F2YKFD2R6BN2PAX4 X-Message-ID-Hash: IPCQWBNV4VBZ2Y46F2YKFD2R6BN2PAX4 X-MailFrom: toke@redhat.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: bpf@vger.kernel.org, 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 , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org X-Mailman-Version: 3.3.6 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: Stanislav Fomichev writes: > On Tue, Nov 15, 2022 at 3:20 PM Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> >> > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >> > index b444b1118c4f..71e3bc7ad839 100644 >> > --- a/include/uapi/linux/bpf.h >> > +++ b/include/uapi/linux/bpf.h >> > @@ -6116,6 +6116,12 @@ enum xdp_action { >> > XDP_REDIRECT, >> > }; >> > >> > +/* Subset of XDP metadata exported to skb context. >> > + */ >> > +struct xdp_skb_metadata { >> > + __u64 rx_timestamp; >> > +}; >> >> Okay, so given Alexei's comment about __randomize_struct not actually >> working, I think we need to come up with something else for this. Just >> sticking this in a regular UAPI header seems like a bad idea; we'd just >> be inviting people to use it as-is. >> >> Do we actually need the full definition here? It's just a pointer >> declaration below, so is an opaque forward-definition enough? Then we >> could have the full definition in an internal header, moving the full >> definition back to being in vmlinux.h only? > > Looks like having a uapi-declaration only (and moving the definition > into the kernel headers) might work. At least it does in my limited > testing :-) So let's go with that for now. Alexei, thanks for the > context on __randomize_struct! Sounds good! :) -Toke