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.129.124]) by mail.toke.dk (Postfix) with ESMTPS id 2C8F09CFDA7 for ; Thu, 15 Dec 2022 00:46:31 +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=X4Ts1n/k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671061590; 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=DCzldWN/5cZ2JoAWZJugna0y9Vh9nWLOhmVhul+oqOk=; b=X4Ts1n/kyW2Mda5MfCQcN0UKo8zJYPv0Ex2KjFso3usbOJ5ERyx5Ggd0Z7ZmqdF5Yv+o3W pNFR5mbF8nHWaXEmC6w+hyptlwYE631L4ksnwfZZADxj7RHhIlf6Hndrx7ZEMsMowEYxGp p8dc8NyOYAd1DITTJ4zsttxV5LUA310= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-363-bpTWDtEwOAiTcpR-2InueA-1; Wed, 14 Dec 2022 18:46:29 -0500 X-MC-Unique: bpTWDtEwOAiTcpR-2InueA-1 Received: by mail-ed1-f71.google.com with SMTP id z20-20020a05640240d400b0047028edd264so4878543edb.20 for ; Wed, 14 Dec 2022 15:46:28 -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=DCzldWN/5cZ2JoAWZJugna0y9Vh9nWLOhmVhul+oqOk=; b=LRzO+ArF2DLWVZkl9UvOKdqH+JNgujc1H99Jll4xDQ/a418jbNcTbEEdUhtoqjkx3j sJSClKIwSKOOsdUecUD7BSsKq9fPbYsd37Qdf5LPMrnRB4Cn+ZZigZtq29ec2/2VqB6w vWyDVNDg3M2fogK6gaea8ahKQGVOtz8XBJ4b5fw98Eqbv6MXjMkgDVeCoMmg12WC4xrV ayUVFcmhVkCsIIvoTcrSqA1KANa6pPxFtihsJxqamufXZjvv2Ut8byhaAWRF0J53UQ77 /ZsIqPvdCvklZqqvQas0XF9+nT+FSwtmVW95CixFW1JQjaebCJxgjxmO6qrM98sWcBcx cNbg== X-Gm-Message-State: ANoB5pkf4AnE5hsB98ZSxQEEvx5LbfWJAsAFG8s/ex9tV34PFdYkCZuB nuWIRLBZa4pBVdiIMzoJixMAkAfZbRUbg5UxNEq5CpRLmx7PigISPgkkTvMYoABy+bFjE88EHk8 TIWL1S1Gyd899f8Eyt3vn X-Received: by 2002:aa7:db91:0:b0:461:9075:4161 with SMTP id u17-20020aa7db91000000b0046190754161mr21220479edt.15.1671061585937; Wed, 14 Dec 2022 15:46:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pBlQ2i0qP1De1qzz2UYRP1C/T5yT57y4dH7rQWDDbGIxTpFhIM14u64IWVSzOvPMkZlsnFA== X-Received: by 2002:aa7:db91:0:b0:461:9075:4161 with SMTP id u17-20020aa7db91000000b0046190754161mr21220454edt.15.1671061585065; Wed, 14 Dec 2022 15:46:25 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id dc20-20020a170906c7d400b007c0f90a9cc5sm6407157ejb.105.2022.12.14.15.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 15:46:23 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 3DD2B82F671; Thu, 15 Dec 2022 00:46:23 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Stanislav Fomichev In-Reply-To: References: <20221213023605.737383-1-sdf@google.com> <20221213023605.737383-2-sdf@google.com> <87fsdigtow.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 15 Dec 2022 00:46:23 +0100 Message-ID: <87r0x1eegg.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: EAQOLOZWGNYWN6K7S4XK54EKYBP56SPG X-Message-ID-Hash: EAQOLOZWGNYWN6K7S4XK54EKYBP56SPG 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: David Vernet , 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.7 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v4 01/15] bpf: Document XDP RX metadata 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 Wed, Dec 14, 2022 at 2:34 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> >> Stanislav Fomichev writes: >> >> > On Tue, Dec 13, 2022 at 8:37 AM David Vernet wrot= e: >> >> >> >> On Mon, Dec 12, 2022 at 06:35:51PM -0800, Stanislav Fomichev wrote: >> >> > Document all current use-cases and assumptions. >> >> > >> >> > Cc: John Fastabend >> >> > Cc: David Ahern >> >> > Cc: Martin KaFai Lau >> >> > Cc: Jakub Kicinski >> >> > Cc: Willem de Bruijn >> >> > Cc: Jesper Dangaard Brouer >> >> > Cc: Anatoly Burakov >> >> > Cc: Alexander Lobakin >> >> > Cc: Magnus Karlsson >> >> > Cc: Maryam Tahhan >> >> > Cc: xdp-hints@xdp-project.net >> >> > Cc: netdev@vger.kernel.org >> >> > Signed-off-by: Stanislav Fomichev >> >> > --- >> >> > Documentation/bpf/xdp-rx-metadata.rst | 90 +++++++++++++++++++++++= ++++ >> >> > 1 file changed, 90 insertions(+) >> >> > create mode 100644 Documentation/bpf/xdp-rx-metadata.rst >> >> > >> >> > diff --git a/Documentation/bpf/xdp-rx-metadata.rst b/Documentation/= bpf/xdp-rx-metadata.rst >> >> > new file mode 100644 >> >> > index 000000000000..498eae718275 >> >> > --- /dev/null >> >> > +++ b/Documentation/bpf/xdp-rx-metadata.rst >> >> >> >> I think you need to add this to Documentation/bpf/index.rst. Or even >> >> better, maybe it's time to add an xdp/ subdirectory and put all docs >> >> there? Don't want to block your patchset from bikeshedding on this >> >> point, so for now it's fine to just put it in >> >> Documentation/bpf/index.rst until we figure that out. >> > >> > Maybe let's put it under Documentation/networking/xdp-rx-metadata.rst >> > and reference form Documentation/networking/index.rst? Since it's more >> > relevant to networking than the core bpf? >> > >> >> > @@ -0,0 +1,90 @@ >> >> > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> > +XDP RX Metadata >> >> > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> > + >> >> > +XDP programs support creating and passing custom metadata via >> >> > +``bpf_xdp_adjust_meta``. This metadata can be consumed by the foll= owing >> >> > +entities: >> >> >> >> Can you add a couple of sentences to this intro section that explains >> >> what metadata is at a high level? >> > >> > I'm gonna copy-paste here what I'm adding, feel free to reply back if >> > still unclear. (so we don't have to wait another week to discuss the >> > changes) >> > >> > XDP programs support creating and passing custom metadata via >> > ``bpf_xdp_adjust_meta``. The metadata can contain some extra informati= on >> > about the packet: timestamps, hash, vlan and tunneling information, et= c. >> > This metadata can be consumed by the following entities: >> >> This is not really accurate, though? The metadata area itself can >> contain whatever the XDP program wants it to, and I think you're >> conflating the "old" usage for arbitrary storage with the driver-kfunc >> metadata support. >> >> I think we should clear separate the two: the metadata area is just a >> place to store data (and is not consumed by the stack, except that >> TC-BPF programs can access it), and the driver kfuncs are just a general >> way to get data out of the drivers (and has nothing to do with the >> metadata area, you can just get the data into stack variables). >> >> While it would be good to have a documentation of the general metadata >> area stuff somewhere, I don't think it necessarily have to be part of >> this series, so maybe just stick to documenting the kfuncs? > > Maybe I can reword to something like below? > > The metadata can be used to store some extra information about the > packet timestamps, hash, vlan and tunneling information, etc. > > This way we are not actually defining what it is, but hinting about > how it's commonly used? Sent another reply to the original patch with some comments that are hopefully a bit more constructive :) -Toke