]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
aoe: print warning regarding a common reason for dropped transmits
authorEd Cashin <ecashin@coraid.com>
Tue, 18 Dec 2012 00:03:28 +0000 (16:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 01:15:23 +0000 (17:15 -0800)
Dropped transmits are not common, but when they do occur, increasing
the transmit queue length often helps.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/aoe/aoenet.c

index 162c6471275c6792454871732e1d4d21cefa04ac..24eca2bf94165820f4255980e7474e3f3fdef9fe 100644 (file)
@@ -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;