[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB9254DC4B7984E014206A1FBFD84EA@IA3PR11MB9254.namprd11.prod.outlook.com>
Date: Tue, 8 Jul 2025 01:34:13 +0000
From: "Song, Yoong Siang" <yoong.siang.song@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Jonathan Corbet <corbet@....net>, Alexei Starovoitov
<ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "Jesper Dangaard
Brouer" <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Stanislav Fomichev <sdf@...ichev.me>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
<eddyz87@...il.com>, Song Liu <song@...nel.org>, Yonghong Song
<yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>, Hao Luo
<haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>, Mykola Lysenko
<mykolal@...com>, Shuah Khan <shuah@...nel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-doc@...r.kernel.org"
<linux-doc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
Subject: RE: [PATCH bpf-next 0/2] Clarify and Enhance XDP Rx Metadata Handling
On Tuesday, July 8, 2025 4:55 AM, Jakub Kicinski <kuba@...nel.org> wrote:
>On Tue, 1 Jul 2025 12:29:38 +0800 Song Yoong Siang wrote:
>> |<---sizeof(xdp_meta)--|
>> | |
>> struct xdp_meta rx_desc->address
>> ^ ^
>> | |
>> +----------+----------------------+------------+------+
>> | headroom | custom metadata | reserved | data |
>> +----------+----------------------+------------+------+
>> ^ ^ ^
>> | | |
>> struct xdp_meta xdp_buff->data_meta xdp_buff->data
>> | |
>> |<---sizeof(xdp_meta)--|
>
>Huh. Did AF_XDP maintainers explicitly sign off on this or it's just how
>IGC implementation works and nobody noticed?
>
Previously, IGC do copy out the Rx hwts from metadata area,
so no problem when implementing XDP Rx metadata.
After that, net_device_ops.ndo_get_tstamp() is added into IGC to
support timestamping from both free-running clock and adjustable clock.
The 2 timers are stored in the metadata area, thus causing the issue.
>For normal XDP my understanding is that its the driver's responsibility
>to move the "reserved" stuff out of place before presenting the frame to
>program.
Is it means that driver needs to move out the "reserved" stuff before XDP program
and then move back the stuff after XDP program for certain situation, like XDP_PASS?
IMHO, if driver is allowed to use some portion of the metadata area, then
the packet processing will be more efficiency and also align with the "zero-copy" idea.
Any thoughts?
Powered by blists - more mailing lists