RE: [PATCH net v4] igb: Fix XDP with PTP enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>
>Sent: Monday, May 3, 2021 12:58 PM
>To: Brandeburg, Jesse <jesse.brandeburg@xxxxxxxxx>; Nguyen, Anthony L
><anthony.l.nguyen@xxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>;
>Jakub Kicinski <kuba@xxxxxxxxxx>
>Cc: Alexei Starovoitov <ast@xxxxxxxxxx>; Daniel Borkmann
><daniel@xxxxxxxxxxxxx>; Jesper Dangaard Brouer <hawk@xxxxxxxxxx>; John
>Fastabend <john.fastabend@xxxxxxxxx>; Sven Auhagen
><sven.auhagen@xxxxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx;
>netdev@xxxxxxxxxxxxxxx; bpf@xxxxxxxxxxxxxxx; Ilias Apalodimas
><ilias.apalodimas@xxxxxxxxxx>; Lorenzo Bianconi <lorenzo@xxxxxxxxxx>;
>Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>; Richard Cochran
><richardcochran@xxxxxxxxx>; Alexander Duyck
><alexander.duyck@xxxxxxxxx>; Tyler S <tylerjstachecki@xxxxxxxxx>;
>Fijalkowski, Maciej <maciej.fijalkowski@xxxxxxxxx>; Kurt Kanzenbach
><kurt@xxxxxxxxxxxxx>
>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@xxxxxxxxxxxxx>
>---
>
>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@xxxxxxxxxxxxx/
> * https://lkml.kernel.org/netdev/20210419072332.7246-1-
>kurt@xxxxxxxxxxxxx/
> * https://lkml.kernel.org/netdev/20210415092145.27322-1-
>kurt@xxxxxxxxxxxxx/
> * https://lkml.kernel.org/netdev/20210412101713.15161-1-
>kurt@xxxxxxxxxxxxx/
>
> 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@xxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux