[Intel-wired-lan] [PATCH net] igb: Fix XDP with PTP enabled
Jesper Dangaard Brouer
jbrouer at redhat.com
Thu Apr 15 12:04:38 UTC 2021
On Thu, 15 Apr 2021 11:21:45 +0200
Kurt Kanzenbach <kurt at linutronix.de> wrote:
> 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.
Doesn't the i210 card use the igc driver?
This change is for igb driver.
> Fixes: 9cbc948b5a20 ("igb: add XDP support")
> Signed-off-by: Kurt Kanzenbach <kurt at linutronix.de>
> ---
[...]
>
> drivers/net/ethernet/intel/igb/igb.h | 3 +-
> drivers/net/ethernet/intel/igb/igb_main.c | 46 ++++++++++++-----------
> drivers/net/ethernet/intel/igb/igb_ptp.c | 21 ++++-------
> 3 files changed, 33 insertions(+), 37 deletions(-)
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
More information about the Intel-wired-lan
mailing list