From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by mail.toke.dk (Postfix) with ESMTPS id F17D59C2980 for ; Wed, 16 Nov 2022 04:49:34 +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=KSecYQqI Received: by mail-oo1-xc32.google.com with SMTP id g15-20020a4a894f000000b0047f8e899623so2328037ooi.5 for ; Tue, 15 Nov 2022 19:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sn1PU0fhKeuhqwgr9BNVczeTZXPqtOjMcepvP649/uM=; b=KSecYQqIgdvkAamvuPhaAjfNRU1nsJQxItgUhdghyteHPLHArb4UBV61+XvkB1BYZV lOspB31aHbzJaoQ+U7w0Ew77M7Ww7CqsDfVV8XduYHOuy+kGpHUJfucUTxaEYC+cSh4s dlQMh2etxa7oiMpwezGIU+3vbarxfV5M0HapWebEqGWJSabLb2jheictduThrDshMvph crvMqa6fZ3Ff1JTnMAmzfzmH0V8Hm6EBwvo7h7HyI/hjRfX4cXwoEyzGNSonkHfmNnz8 f4YKyq5JHuhOiePFwRBCy4x+ePt/+YZ1Yv1L8PWj9i4KB/ooAlDrWwjml6ltBUD2vauB PIvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=sn1PU0fhKeuhqwgr9BNVczeTZXPqtOjMcepvP649/uM=; b=whNLx7oMW/egAFnHF7OX4qIKJ7mvIWaOxXhzqfpTYCEv0X53aqzz8l3ZIevhWVo0q+ kx4+FPZxXWu0d0uyyQpH9nevUcrv0SgPBZF6vr40ZDldlufb/a1LM5nDwxf6Yu6XFVNP dpGyjLoaX7GvO4srDvXBxod/ddcWE7TJsyhYmj6j2Ny/7ZPYHaB9gWXcUs0Qd6h1wFU1 wtCoSHbgy+MzcWBleFeCP9nrxiN83xqjrV/hifRcBWPJeQRjun98oJRq7lOM00dpsRGp /LQBUwb78J5aroJsLtKofgL29C+Z393xCbMbLd4qEt6jUlGg1DRFEiIdESI/WQIXOX42 620g== X-Gm-Message-State: ANoB5plWAInw28WSWYbahCBBar7Cr6huWQolK043d4Jke+spbJ6JT3iN vWseqaL+4ncwNItwg3IdosaxpaTXzqXF9Ub+4b5sow== X-Google-Smtp-Source: AA0mqf5774YJd7bWBwwygoPi/UspxVSpQCcUE+J2lCZVLszFqqptm6MNss35oP+CuTYc2V6oj5n8xA3A40mR3Sdxgvo= X-Received: by 2002:a05:6820:1687:b0:480:a6b4:d398 with SMTP id bc7-20020a056820168700b00480a6b4d398mr8995102oob.86.1668570572838; Tue, 15 Nov 2022 19:49:32 -0800 (PST) MIME-Version: 1.0 References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> <87wn7vdcud.fsf@toke.dk> In-Reply-To: <87wn7vdcud.fsf@toke.dk> From: Stanislav Fomichev Date: Tue, 15 Nov 2022 19:49:21 -0800 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GOKKR7OWMDB7DRS2LH6NJYF6JMQBMDIH X-Message-ID-Hash: GOKKR7OWMDB7DRS2LH6NJYF6JMQBMDIH 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: 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: 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!