All of lore.kernel.org
 help / color / mirror / Atom feed
* AF_XDP busy poll receives packets in batches of 8 on i40e
@ 2022-03-17 14:36 Federico Parola
  2022-03-17 14:59 ` Jay Vosburgh
  0 siblings, 1 reply; 9+ messages in thread
From: Federico Parola @ 2022-03-17 14:36 UTC (permalink / raw)
  To: xdp-newbies

Hello everybody,
I'm experiencing a strange problem when running an AF_XDP application 
with busy poll enabled on a Intel XL710 NIC (i40e driver).
The problem can be replicated running the xdpsock kernel sample in rx or 
l2fwd mode.
The first packet I send to the machine is correctly received by the 
application. After this, packets are only received in batches of 8.
If I send 7 packets the application sees nothing, while the 8th one 
triggers the reception of all 8 packets.
Disabling the busy poll mode everything works fine and packets are 
immediately received as they are sent.

I tried changing kernel (5.12, 5.14 and 5.16) but all present the same 
problem.
I also tried using another NIC, an Intel X540 with ixgbe driver and the 
problem isn't there, so I guess is NIC/driver related.

I tried monitoring ethtool statistics. When sending packets between 1 
and 7 these counters are increased:
stat:           64 (             64) <= port.rx_bytes /sec
stat:            1 (              1) <= port.rx_size_64 /sec
stat:            1 (              1) <= port.rx_unicast /sec
stat:            1 (              1) <= rx_unicast /sec

While the 8th one triggers this updates:
stat:           64 (             64) <= port.rx_bytes /sec
stat:            1 (              1) <= port.rx_size_64 /sec
stat:            1 (              1) <= port.rx_unicast /sec
stat:          477 (            477) <= rx-0.bytes /sec
stat:            8 (              8) <= rx-0.packets /sec
stat:          477 (            477) <= rx_bytes /sec
stat:            8 (              8) <= rx_packets /sec
stat:            1 (              1) <= rx_unicast /sec

As far as I understand the first set of counters are hardware counters, 
so it makes me think that packets are kept in the NIC and not even sent 
to memory.

Does anyone have any suggestion on what could be causing this problem? 
Does enabling busy poll set some flag on the NIC?

Best regards,
Federico Parola

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-18 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 14:36 AF_XDP busy poll receives packets in batches of 8 on i40e Federico Parola
2022-03-17 14:59 ` Jay Vosburgh
2022-03-17 15:34   ` Federico Parola
2022-03-17 16:41     ` Jesse Brandeburg
2022-03-17 23:26       ` Jay Vosburgh
2022-03-18 10:30         ` Federico Parola
2022-03-18 18:33           ` Jay Vosburgh
2022-03-18 19:29             ` Jesse Brandeburg
2022-03-17 16:59     ` Jay Vosburgh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.