From 4e78dd144b865162626f811d1097b6d181ec6a31 Mon Sep 17 00:00:00 2001 From: Ed Cashin Date: Mon, 17 Dec 2012 16:03:28 -0800 Subject: [PATCH] aoe: print warning regarding a common reason for dropped transmits Dropped transmits are not common, but when they do occur, increasing the transmit queue length often helps. Signed-off-by: Ed Cashin Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/aoe/aoenet.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index 162c6471275c..24eca2bf9416 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c @@ -52,13 +52,18 @@ static struct sk_buff_head skbtxq; /* enters with txlock held */ static int -tx(void) +tx(void) __must_hold(&txlock) { struct sk_buff *skb; + struct net_device *ifp; while ((skb = skb_dequeue(&skbtxq))) { spin_unlock_irq(&txlock); - dev_queue_xmit(skb); + ifp = skb->dev; + if (dev_queue_xmit(skb) == NET_XMIT_DROP && net_ratelimit()) + pr_warn("aoe: packet could not be sent on %s. %s\n", + ifp ? ifp->name : "netif", + "consider increasing tx_queue_len"); spin_lock_irq(&txlock); } return 0; -- 2.20.1