RE: [PATCH iwl-net v1 1/1] igc: Fix data_meta pointer adjustment for XDP zero-copy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, July 1, 2025 4:10 PM, Song Yoong Siang <yoong.siang.song@xxxxxxxxx> wrote:
>Remove the unnecessary increment of the data_meta pointer to ensure the
>metadata area is correctly presented to XDP program and to avoid accidental
>overwriting of device-reserved metadata by XDP programs.
>
>Previously, the data_meta pointer was incorrectly advanced when handling
>hardware timestamps for XDP zero-copy frames. Since the HW timestamp is no
>longer copied into a local variable, there is no need to adjust data_meta.
>
>Fixes: 069b142f5819 ("igc: Add support for PTP .getcyclesx64()")
>Reported-by: Zdenek Bouska <zdenek.bouska@xxxxxxxxxxx>
>Closes: https://lore.kernel.org/netdev/AS1PR10MB5675499EE0ED3A579151D3D3EBE02@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
>Signed-off-by: Song Yoong Siang <yoong.siang.song@xxxxxxxxx>
>---
> drivers/net/ethernet/intel/igc/igc_main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igc/igc_main.c
>b/drivers/net/ethernet/intel/igc/igc_main.c
>index 686793c539f2..8362e789777e 100644
>--- a/drivers/net/ethernet/intel/igc/igc_main.c
>+++ b/drivers/net/ethernet/intel/igc/igc_main.c
>@@ -2829,11 +2829,6 @@ static int igc_clean_rx_irq_zc(struct igc_q_vector
>*q_vector, const int budget)
> 			ctx->rx_ts = bi->xdp->data;
>
> 			bi->xdp->data += IGC_TS_HDR_LEN;
>-
>-			/* HW timestamp has been copied into local variable. Metadata
>-			 * length when XDP program is called should be 0.
>-			 */
>-			bi->xdp->data_meta += IGC_TS_HDR_LEN;
> 			size -= IGC_TS_HDR_LEN;
> 		} else {
> 			ctx->rx_ts = NULL;
>--
>2.34.1
>

Following the discussion in [1], since there is no strong justification for making
the metadata length user-visible at this time, we have opted to retain the
current implementation of the data_meta pointer.

[1] https://lore.kernel.org/netdev/IA3PR11MB92541178AAF28F03639A9435D840A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux