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

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

 



On Mon,  3 May 2021 09:28:00 +0200
Kurt Kanzenbach <kurt@xxxxxxxxxxxxx> 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.
> 
> Fixes: 9cbc948b5a20 ("igb: add XDP support")
> Signed-off-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>

Thanks for fixing this!

Acked-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>

I expect that we/I will (soon) play with getting this area that is
stored in front of the packet (the XDP data_meta area) described via
BTF.  This way both xdp_frame and AF_XDP can get structured access (e.g.
to the PTP timestamp in this case).

I'll be adding my notes on this project here:
 https://github.com/xdp-project/xdp-project/blob/master/areas/tsn/

Looking forward to collaborate on this with you :-)
-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer




[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