[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <207d97d0-8750-44e1-8618-78e936f54750@intel.com>
Date: Tue, 13 Jan 2026 16:09:01 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Paul Menzel <pmenzel@...gen.mpg.de>, Mina Almasry <almasrymina@...gle.com>
CC: <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, YiFei Zhu <zhuyifei@...gle.com>, "Alexei
Starovoitov" <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "David
S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, "Jesper
Dangaard Brouer" <hawk@...nel.org>, John Fastabend
<john.fastabend@...il.com>, Stanislav Fomichev <sdf@...ichev.me>, Tony Nguyen
<anthony.l.nguyen@...el.com>, Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Andrew Lunn <andrew+netdev@...n.ch>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>,
<intel-wired-lan@...ts.osuosl.org>, Aleksandr Loktionov
<aleksandr.loktionov@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4] idpf: export RX hardware
timestamping information to XDP
From: Paul Menzel <pmenzel@...gen.mpg.de>
Date: Sat, 10 Jan 2026 09:35:58 +0100
> Dear Mina,
>
>
> Thank you for your patch. Some minor comments, should you resend.
[...]
>> @@ -166,6 +173,19 @@ idpf_xdp_get_qw2(struct idpf_xdp_rx_desc *desc,
>> #endif
>> }
>> +static inline void
>> +idpf_xdp_get_qw3(struct idpf_xdp_rx_desc *desc,
>> + const struct virtchnl2_rx_flex_desc_adv_nic_3 *rxd)
>> +{
>> +#ifdef __LIBETH_WORD_ACCESS
>> + desc->qw3 = ((const typeof(desc))rxd)->qw3;
>> +#else
>> + desc->qw3 = ((u64)le32_to_cpu(rxd->ts_high) << 32) |
>> + ((u64)le16_to_cpu(rxd->fmd6) << 16) |
>> + le16_to_cpu(rxd->l2tag1);
>> +#endif
>
> It’s done elsewhere in the file, but I wonder why use the preprocessor
> and not plain C code, and let the linker(?) remove the unneeded branch?
Do you mean IS_ENABLED()?
In the libeth_xdp code, several paths won't build with IS_ENABLED(),
here in idpf it might work out, but I did it the same way as in
libeth_xdp for consistency.
>
>> +}
>> +
>> void idpf_xdp_set_features(const struct idpf_vport *vport);
>> int idpf_xdp(struct net_device *dev, struct netdev_bpf *xdp);
>
>
> Kind regards,
>
> Paul
Thanks,
Olek
Powered by blists - more mailing lists