[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]

 



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





[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