Commit 4e78dd14 authored by Ed Cashin's avatar Ed Cashin Committed by Linus Torvalds

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: default avatarEd Cashin <ecashin@coraid.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 662a8896
...@@ -52,13 +52,18 @@ static struct sk_buff_head skbtxq; ...@@ -52,13 +52,18 @@ static struct sk_buff_head skbtxq;
/* enters with txlock held */ /* enters with txlock held */
static int static int
tx(void) tx(void) __must_hold(&txlock)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct net_device *ifp;
while ((skb = skb_dequeue(&skbtxq))) { while ((skb = skb_dequeue(&skbtxq))) {
spin_unlock_irq(&txlock); 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); spin_lock_irq(&txlock);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment