>-----Original Message----- >From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of >Kurt Kanzenbach >Sent: Monday, April 12, 2021 3:47 PM >To: Brandeburg, Jesse <jesse.brandeburg@xxxxxxxxx>; Nguyen, Anthony L ><anthony.l.nguyen@xxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; >Jakub Kicinski <kuba@xxxxxxxxxx> >Cc: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>; Jesper Dangaard Brouer ><hawk@xxxxxxxxxx>; Daniel Borkmann <daniel@xxxxxxxxxxxxx>; >netdev@xxxxxxxxxxxxxxx; Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>; >Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx>; Alexei Starovoitov ><ast@xxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx; bpf@xxxxxxxxxxxxxxx; >Lorenzo Bianconi <lorenzo@xxxxxxxxxx> >Subject: [Intel-wired-lan] [PATCH RFC net] igb: Fix XDP with PTP enabled > >When using native XDP with the igb driver, the XDP frame data doesn't point >to the beginning of the packet. It's off by 16 bytes. Everything works as >expected with XDP skb mode. > >Actually these 16 bytes are used to store the packet timestamps. Therefore, >pull the timestamp before executing any XDP operations and adjust all other >code accordingly. The igc driver does it like that as well. > >Tested with Intel i210 card and AF_XDP sockets. > >Fixes: 9cbc948b5a20 ("igb: add XDP support") >Signed-off-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx> >--- > drivers/net/ethernet/intel/igb/igb.h | 3 +- > drivers/net/ethernet/intel/igb/igb_main.c | 45 ++++++++++++----------- >drivers/net/ethernet/intel/igb/igb_ptp.c | 18 ++++----- > 3 files changed, 32 insertions(+), 34 deletions(-) > Tested-by: Sandeep Penigalapati <sandeep.penigalapati@xxxxxxxxx>