Thread (13 messages) read the whole thread 13 messages, 3 authors, 2023-10-10

Re: [PATCH net-next v7 3/3] net: axienet: Introduce dmaengine support

From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-10-10 00:18:02
Also in: linux-arm-kernel, linux-devicetree, lkml

On Mon, 9 Oct 2023 19:41:35 +0000 Pandey, Radhey Shyam wrote:
quoted
But somewhere else or just here after printing the warning?  
There is call to netif_stop_queue(ndev) just before this netdev_warn.
I copied below for quick reference.

+	sg_len = skb_shinfo(skb)->nr_frags + 1;
+	if (!CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX)) {
+		netif_stop_queue(ndev);
+		if (net_ratelimit())
+			netdev_warn(ndev, "TX ring unexpectedly full\n");
+		return NETDEV_TX_BUSY;
+	}

However, I noticed above check doesn't account for all frags - so will 
modify the if check to see if available space is less than sg_len. If yes, then 
stop the queue and return busy , else continue with xmit.
Please take a look at:

https://www.kernel.org/doc/html/next/networking/driver.html#stop-queues-in-advance
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help