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 EDBDB9D017C for ; Thu, 15 Dec 2022 15:04:13 +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=byr6RBNS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671113052; 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=2Gf1AAICEsPNtqm72Q90KN4eUj2r/iwfqUiFa3BKKyo=; b=byr6RBNSBtsupLUkYJyhAJ+MdmGmrHNXERBfg1GAHBnBib430wc/wuwZHq0VGrcW/ZYQfm 8md556pyY5ilnLAnHYzFFDSdQqWZUKErVcQ3bx8qAelDiBYthBGwJfqtPyAeVNepxOZhhk bXNVh3VQbh6LMeSD+Z0+h9irzPuiItE= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-212-XPHIYtymMxyCC5wanTeHjw-1; Thu, 15 Dec 2022 09:04:09 -0500 X-MC-Unique: XPHIYtymMxyCC5wanTeHjw-1 Received: by mail-lj1-f197.google.com with SMTP id z17-20020a2e9b91000000b0027a23724323so2706253lji.0 for ; Thu, 15 Dec 2022 06:04:09 -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=ofZsEtPN7uRhdLWCDY/UttSnpuZfov13p+90OTHUFwk=; b=NAo3b1pFcW02L+Y8N35f5YQ/sBqBFEx7LWErfCMxUHoJTaLL2yU70FIcLRy9AzI1N5 TxSWMnNq8FDCco0Mzh89wASDrH+/Jbzsa4/86IcO4xI3w8CRPZnhp+7v4CPwncUM2DE9 l7p94fHZYAZ+vy4B+hc8IUnvO0W4oDojjsexhANECX5BdsiGWtgVOcqJ6VH3iTlks8cm +E5//LXvM5Kb87iqrasJulwEseen64ZL490ioMyhEc84pAyDTtirQpKpq0PDryaF2ifH Ff1MDbybXeUm92uIN8mLiOnF41A6Z5WJPXSJWh+ev/Z+TwC+fR0lXzWClscol1wicpjQ Uzzw== X-Gm-Message-State: ANoB5pneX54ez7a1rCrgD2dc5o0pKMMBV9/C3kQyyDEKCzSG+crpCotu /3JsxRchAWCafYCy6QM3HJhJrPLeKUHOonBR3CdLb6+JUKng6h6Xr8RmmVCenE2PHQV2HOK1wli hSwG9wioeCJM5kvb3Yfpw X-Received: by 2002:a05:651c:1951:b0:27b:5819:49b with SMTP id bs17-20020a05651c195100b0027b5819049bmr4804719ljb.5.1671113047102; Thu, 15 Dec 2022 06:04:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf5yzbZM0O7TllBtP6CdWAhfDF+rriwVUSsIgk4pb+v/KKB5aSC5IRaLZr9Rq52cdszz03wRdw== X-Received: by 2002:a05:651c:1951:b0:27b:5819:49b with SMTP id bs17-20020a05651c195100b0027b5819049bmr4804587ljb.5.1671113046019; Thu, 15 Dec 2022 06:04:06 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id 17-20020a170906311100b0073d81b0882asm7187325ejx.7.2022.12.15.06.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 06:04:05 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id BF25D82F7DB; Thu, 15 Dec 2022 15:04:04 +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> <87r0x1eegg.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 15 Dec 2022 15:04:04 +0100 Message-ID: <87cz8kepbf.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: 35GTA4SIYZT56NEINXGM4VZINGEPSWZU X-Message-ID-Hash: 35GTA4SIYZT56NEINXGM4VZINGEPSWZU 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 3:46 PM Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> >> 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 w= rote: >> >> >> >> >> >> 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/Documentati= on/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 ev= en >> >> >> better, maybe it's time to add an xdp/ subdirectory and put all do= cs >> >> >> 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.r= st >> >> > and reference form Documentation/networking/index.rst? Since it's m= ore >> >> > 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 f= ollowing >> >> >> > +entities: >> >> >> >> >> >> Can you add a couple of sentences to this intro section that expla= ins >> >> >> 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 th= e >> >> > changes) >> >> > >> >> > XDP programs support creating and passing custom metadata via >> >> > ``bpf_xdp_adjust_meta``. The metadata can contain some extra inform= ation >> >> > about the packet: timestamps, hash, vlan and tunneling information,= etc. >> >> > 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-kfun= c >> >> 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 gene= ral >> >> 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 metadat= a >> >> 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 :) > > Thanks, everything makes sense, will incorporate. I'll also try to > share the patches privately with you sometime tomorrow maybe; not > super comfortable sending them out with a bunch of changes on top of > your authorship without some kind of ack from you :-) OK, sounds good. Tomorrow (Friday) is my last day before the holidays, but happy to look things over before I sign off :) -Toke