All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next] igc: Avoid transmit queue timeout for XDP
@ 2023-04-12  7:36 ` Kurt Kanzenbach
  0 siblings, 0 replies; 14+ messages in thread
From: Kurt Kanzenbach @ 2023-04-12  7:36 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen
  Cc: netdev, Kurt Kanzenbach, Eric Dumazet, intel-wired-lan,
	Ong Boon Leong, Jakub Kicinski, Paolo Abeni, David S. Miller

High XDP load triggers the netdev watchdog:

|NETDEV WATCHDOG: enp3s0 (igc): transmit queue 2 timed out

The reason is the Tx queue transmission start (txq->trans_start) is not updated
in XDP code path. Therefore, add it for all XDP transmission functions.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index ba49728be919..e71e85e3bcc2 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -2384,6 +2384,8 @@ static int igc_xdp_xmit_back(struct igc_adapter *adapter, struct xdp_buff *xdp)
 	nq = txring_txq(ring);
 
 	__netif_tx_lock(nq, cpu);
+	/* Avoid transmit queue timeout since we share it with the slow path */
+	txq_trans_cond_update(nq);
 	res = igc_xdp_init_tx_descriptor(ring, xdpf);
 	__netif_tx_unlock(nq);
 	return res;
@@ -2786,6 +2788,9 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring)
 
 	__netif_tx_lock(nq, cpu);
 
+	/* Avoid transmit queue timeout since we share it with the slow path */
+	txq_trans_cond_update(nq);
+
 	budget = igc_desc_unused(ring);
 
 	while (xsk_tx_peek_desc(pool, &xdp_desc) && budget--) {
@@ -6311,6 +6316,9 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,
 
 	__netif_tx_lock(nq, cpu);
 
+	/* Avoid transmit queue timeout since we share it with the slow path */
+	txq_trans_cond_update(nq);
+
 	drops = 0;
 	for (i = 0; i < num_frames; i++) {
 		int err;
-- 
2.30.2

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

end of thread, other threads:[~2023-05-01 10:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12  7:36 [Intel-wired-lan] [PATCH net-next] igc: Avoid transmit queue timeout for XDP Kurt Kanzenbach
2023-04-12  7:36 ` Kurt Kanzenbach
2023-04-12 22:30 ` [Intel-wired-lan] " Jacob Keller
2023-04-12 22:30   ` Jacob Keller
2023-04-13  7:20   ` [Intel-wired-lan] " Kurt Kanzenbach
2023-04-13  7:20     ` Kurt Kanzenbach
2023-04-13 16:03   ` [Intel-wired-lan] " Jakub Kicinski
2023-04-13 16:03     ` Jakub Kicinski
2023-04-13 16:39     ` [Intel-wired-lan] " Jacob Keller
2023-04-13 16:39       ` Jacob Keller
2023-04-13 21:19       ` [Intel-wired-lan] " David Laight
2023-04-13 21:19         ` David Laight
2023-05-01 10:01 ` [Intel-wired-lan] " naamax.meir
2023-05-01 10:01   ` naamax.meir

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.