[Intel-wired-lan] [PATCH net v4] igb: Fix XDP with PTP enabled
Penigalapati, Sandeep
sandeep.penigalapati at intel.com
Thu Jun 3 11:30:44 UTC 2021
>-----Original Message-----
>From: Kurt Kanzenbach <kurt at linutronix.de>
>Sent: Monday, May 3, 2021 12:58 PM
>To: Brandeburg, Jesse <jesse.brandeburg at intel.com>; Nguyen, Anthony L
><anthony.l.nguyen at intel.com>; David S. Miller <davem at davemloft.net>;
>Jakub Kicinski <kuba at kernel.org>
>Cc: Alexei Starovoitov <ast at kernel.org>; Daniel Borkmann
><daniel at iogearbox.net>; Jesper Dangaard Brouer <hawk at kernel.org>; John
>Fastabend <john.fastabend at gmail.com>; Sven Auhagen
><sven.auhagen at voleatech.de>; intel-wired-lan at lists.osuosl.org;
>netdev at vger.kernel.org; bpf at vger.kernel.org; Ilias Apalodimas
><ilias.apalodimas at linaro.org>; Lorenzo Bianconi <lorenzo at kernel.org>;
>Sebastian Andrzej Siewior <bigeasy at linutronix.de>; Richard Cochran
><richardcochran at gmail.com>; Alexander Duyck
><alexander.duyck at gmail.com>; Tyler S <tylerjstachecki at gmail.com>;
>Fijalkowski, Maciej <maciej.fijalkowski at intel.com>; Kurt Kanzenbach
><kurt at linutronix.de>
>Subject: [PATCH net v4] 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 at linutronix.de>
>---
>
>Changes since v3:
>
> * Get rid of timestamp check in hot path (Maciej Fijalkowski)
>
>Changes since v2:
>
> * Check timestamp for validity (Nguyen, Anthony L)
>
>Changes since v1:
>
> * Use xdp_prepare_buff() (Lorenzo Bianconi)
>
>Changes since RFC:
>
> * Removed unused return value definitions (Alexander Duyck)
>
>Previous versions:
>
> * https://lkml.kernel.org/netdev/20210422052617.17267-1-
>kurt at linutronix.de/
> * https://lkml.kernel.org/netdev/20210419072332.7246-1-
>kurt at linutronix.de/
> * https://lkml.kernel.org/netdev/20210415092145.27322-1-
>kurt at linutronix.de/
> * https://lkml.kernel.org/netdev/20210412101713.15161-1-
>kurt at linutronix.de/
>
> drivers/net/ethernet/intel/igb/igb.h | 2 +-
> drivers/net/ethernet/intel/igb/igb_main.c | 45 +++++++++++++----------
>drivers/net/ethernet/intel/igb/igb_ptp.c | 23 +++++-------
> 3 files changed, 37 insertions(+), 33 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati at intel.com>
More information about the Intel-wired-lan
mailing list