[openib-general] [PATCH] ipoib: tx ring overrun

Grant Grundler iod00d at hp.com
Tue Jan 10 11:04:54 PST 2006


On Tue, Jan 10, 2006 at 08:55:15PM +0200, Michael S. Tsirkin wrote:
> Dont try to post more send work requests if the TX ring is full.
> Setting netif_stop_queue is insufficient: linux can still land
> a tx packet on us.
> 
> Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
> 
> Index: openib/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> ===================================================================
> --- openib.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2006-01-10 15:38:36.000000000 +0200
> +++ openib/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2006-01-10 18:49:33.000000000 +0200
> @@ -344,6 +344,13 @@ void ipoib_send(struct net_device *dev, 
>  	 * means we have to make sure everything is properly recorded and
>  	 * our state is consistent before we call post_send().
>  	 */
> +	if (unlikely(priv->tx_head - priv->tx_tail == IPOIB_TX_RING_SIZE)) {
> +		ipoib_dbg(priv, "TX ring full, dropping packet\n");
> +		++priv->stats.tx_errors;

Could this be tx_dropped?

I'm looking at ifconfig output and assuming tx_dropped is used:

grundler at gsyprf3:~$ /sbin/ifconfig ib0
ib0       Link encap:UNSPEC  HWaddr 00-00-04-04-FE-80-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.0.0.51  Bcast:10.0.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:2044  Metric:1
RX packets:1020109972 errors:0 dropped:0 overruns:0 frame:0
TX packets:1549932074 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:128 
RX bytes:160480185298 (149.4 GiB)  TX bytes:1854376582766 (1.6 TiB)

grant

> +		dev_kfree_skb_any(skb);
> +		return;
> +	}
> +
>  	tx_req = &priv->tx_ring[priv->tx_head & (IPOIB_TX_RING_SIZE - 1)];
>  	tx_req->skb = skb;
>  	addr = dma_map_single(priv->ca->dma_device, skb->data, skb->len,
> 
> -- 
> MST
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list