All of lore.kernel.org
 help / color / mirror / Atom feed
* Driver i40e have XDP-redirect bug
@ 2021-03-01 12:18 ` Jesper Dangaard Brouer
  0 siblings, 0 replies; 4+ messages in thread
From: Jesper Dangaard Brouer @ 2021-03-01 12:18 UTC (permalink / raw)
  To: netdev, Björn Töpel, Jesse Brandeburg, Tony Nguyen,
	Marek Majtyka
  Cc: brouer, intel-wired-lan, Jakub Kicinski, Alexei Starovoitov,
	Maciej Fijalkowski, Tony Brelinski,
	Toke Høiland-Jørgensen

Hi i40e-people + XDP-feature-people, 

The driver i40e have a XDP-redirect bug, where is it partly broken. It can
transmit a redirected xdp_frame (from another driver). But broken when
redirecting a xdp_frame that is received by the driver itself.

This reminds me about lacking XDP-features, as this "state" is actually
"supported" (for Intel drivers), when running in 'legacy-rx' mode.  This can
be configured (via: 'ethtool --set-priv-flags i40e2 legacy-rx on').  When
running in 'legacy-rx' mode the headroom is zero, which means that xdp_frame
cannot be created as it is stored in this headroom, but an XDP-prog can
still run a (DDoS) filter.  (Hint grepping after xdp_redirect stats is not enough).

The BUG I experience *is* that headroom is zero, but 'legacy-rx' mode is off:

  $ ethtool --show-priv-flags i40e2 | grep legacy-rx
  legacy-rx             : off

This is clearly a driver initialization bug as the headroom should not
be zero in this configuration. Further indication that this is related
to init order: If while xdp_redirect is running, I change RX-ring size
(e.g. 'ethtool -G i40e2 rx 1024') then redirect starts working again.


I will continue to find the offending commit... (to-be-continued)
(p.s. testing on net-next on top of commit d310ec03a34e92).

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer


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

end of thread, other threads:[~2021-03-01 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 12:18 Driver i40e have XDP-redirect bug Jesper Dangaard Brouer
2021-03-01 12:18 ` [Intel-wired-lan] " Jesper Dangaard Brouer
2021-03-01 18:46 ` Jesper Dangaard Brouer
2021-03-01 18:46   ` [Intel-wired-lan] " Jesper Dangaard Brouer

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.