[Intel-wired-lan] [PATCH RFC net] igb: Fix XDP with PTP enabled

Penigalapati, Sandeep sandeep.penigalapati at intel.com
Wed Jun 2 10:49:15 UTC 2021


>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
>Kurt Kanzenbach
>Sent: Monday, April 12, 2021 3:47 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: Kurt Kanzenbach <kurt at linutronix.de>; Jesper Dangaard Brouer
><hawk at kernel.org>; Daniel Borkmann <daniel at iogearbox.net>;
>netdev at vger.kernel.org; Sebastian Andrzej Siewior <bigeasy at linutronix.de>;
>Ilias Apalodimas <ilias.apalodimas at linaro.org>; Alexei Starovoitov
><ast at kernel.org>; intel-wired-lan at lists.osuosl.org; bpf at vger.kernel.org;
>Lorenzo Bianconi <lorenzo at kernel.org>
>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 at linutronix.de>
>---
> 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 at intel.com>


More information about the Intel-wired-lan mailing list