On Thu, 22 Apr 2021 12:24:32 +0200 Magnus Karlsson <magnus.karlsson@xxxxxxxxx> wrote: > On Wed, Apr 21, 2021 at 5:39 PM Jesper Dangaard Brouer > <brouer@xxxxxxxxxx> wrote: > > > > On Wed, 21 Apr 2021 16:12:32 +0200 > > Magnus Karlsson <magnus.karlsson@xxxxxxxxx> wrote: > > [...] > > > more than I get. > > > > I clearly have a bug in the i40e driver. As I wrote later, I don't see > > any packets transmitted for XDP_TX. Hmm, I using Mel Gorman's tree, > > which contains the i40e/ice/ixgbe bug we fixed earlier. Something is wrong with i40e, I changed git-tree to net-next (at commit 5d869070569a) and XDP seems to have stopped working on i40e :-( $ uname -a Linux broadwell 5.12.0-rc7-net-next+ #600 SMP PREEMPT Thu Apr 22 15:13:15 CEST 2021 x86_64 x86_64 x86_64 GNU/Linux When I load any XDP prog almost no packets are let through: [kernel-bpf-samples]$ sudo ./xdp1 i40e2 libbpf: elf: skipping unrecognized data section(16) .eh_frame libbpf: elf: skipping relo section(17) .rel.eh_frame for section(16) .eh_frame proto 17: 1 pkt/s proto 0: 0 pkt/s proto 17: 0 pkt/s proto 0: 0 pkt/s proto 17: 1 pkt/s On the same system my mlx5 NIC works fine: [kernel-bpf-samples]$ sudo ./xdp1 mlx5p1 libbpf: elf: skipping unrecognized data section(16) .eh_frame libbpf: elf: skipping relo section(17) .rel.eh_frame for section(16) .eh_frame proto 17: 10984608 pkt/s proto 17: 24374656 pkt/s proto 17: 24339904 pkt/s > > The call to xdp_convert_buff_to_frame() fails, but (see below) that > > error is simply converted to I40E_XDP_CONSUMED. Thus, not even the > > 'trace_xdp_exception' will be able to troubleshoot this. You/Intel > > should consider making XDP_TX errors detectable (this will also happen > > if TX ring don't have room). > > This is not good. Will submit a fix. Thanks for reporting Jesper. Usually I use this command to troubleshoot: sudo ./xdp_monitor --stats But as driver i40e doesn't call the 'trace_xdp_exception' then I don't capture any error this way. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer