[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <811eb35f-5c8b-1591-1e68-8856420b4578@redhat.com>
Date: Wed, 18 Aug 2021 13:54:40 +0200
From: Jesper Dangaard Brouer <jbrouer@...hat.com>
To: "Karlsson, Magnus" <magnus.karlsson@...el.com>,
Björn Töpel <bjorn@...nel.org>,
Kishen Maloor <kishen.maloor@...el.com>,
"Desouza, Ederson" <ederson.desouza@...el.com>,
Alexander Lobakin <alobakin@...me>
Cc: brouer@...hat.com,
"xdp-hints@...-project.net" <xdp-hints@...-project.net>,
bpf <bpf@...r.kernel.org>, Netdev <netdev@...r.kernel.org>
Subject: AF_XDP finding descriptor room for XDP-hints metadata size
In previous discussions with AF_XDP maintainers (Magnus+Bjørn), I
understood we have two challenges with metadata and BTF id.
(1) AF_XDP doesn't know size of metadata area.
(2) No room in xdp_desc to store the BTF-id.
Below I propose new idea to solve (1) metadata size.
To follow the discussion this is struct xdp_desc:
/* Rx/Tx descriptor */
struct xdp_desc {
__u64 addr;
__u32 len;
__u32 options;
};
One option (that was rejected) was to store the BTF-id in 'options' and
deduct the metadata size from BTF-id, but it was rejected as it blocks
future usages of 'options'.
The proposal by Magnus was to use a single bit in 'options' to say this
descriptor contains metadata described via BTF info. And Bjørn proposed
to store the BTF-id as the last member in metadata, as it would be
accessible via minus-4 byte offset from packet start 'addr'. And again
via BTF-id code can know the size of metadata area.
My idea is that we could store the metadata size in top-bits of 'len'
member when we have set the 'options' bit for BTF-metadata.
-Jesper
Powered by blists - more mailing lists