All of lore.kernel.org
 help / color / mirror / Atom feed
* XDP_TX bug report on mlx4
@ 2016-09-16 19:03 Jesper Dangaard Brouer
  2016-09-16 19:17 ` Brenden Blanco
  0 siblings, 1 reply; 5+ messages in thread
From: Jesper Dangaard Brouer @ 2016-09-16 19:03 UTC (permalink / raw)
  To: Brenden Blanco
  Cc: brouer, netdev, Tariq Toukan, Alexei Starovoitov, Tom Herbert,
	Saeed Mahameed, Rana Shahout, Eran Ben Elisha

Hi Brenden,

I've discovered a bug with XDP_TX recycling of pages in the mlx4 driver.

If I increase the number of RX and TX queues/channels via ethtool cmd:
 ethtool -L mlx4p1 rx 10 tx 10

Then when running the xdp2 program, which does XDP_TX, the kernel will
crash with page errors, because the page refcnt goes to zero or even
minus.  I've noticed pages delivered to mlx4_en_rx_recycle() can have
a page refcnt of zero, which is wrong, they should always have 1 (for
XDP).

Debugging it further, I find that this can happen when mlx4_en_rx_recycle()
is called from mlx4_en_recycle_tx_desc().  This is the TX cleanup function,
associated with TX ring queues used for XDP_TX only. No others than the
XDP_TX action should be able to place packets into these TX rings
which call mlx4_en_recycle_tx_desc().

Do you have any idea of what could be going wrong in this case?

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

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

end of thread, other threads:[~2016-10-13 19:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 19:03 XDP_TX bug report on mlx4 Jesper Dangaard Brouer
2016-09-16 19:17 ` Brenden Blanco
2016-09-16 19:24   ` Jesper Dangaard Brouer
2016-09-18 23:59     ` Brenden Blanco
2016-10-13 19:46       ` Brenden Blanco

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.