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 <[email protected]>
Closes: 
https://lore.kernel.org/netdev/as1pr10mb5675499ee0ed3a579151d3d3eb...@as1pr10mb5675.eurprd10.prod.outlook.com/
Signed-off-by: Song Yoong Siang <[email protected]>
---
 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

Reply via email to