]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
aoe: print warning regarding a common reason for dropped transmits
authorEd Cashin <ecashin@coraid.com>
Thu, 25 Oct 2012 01:15:20 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 1 Nov 2012 04:24:21 +0000 (15:24 +1100)
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/aoe/aoenet.c

index 162c6471275c6792454871732e1d4d21cefa04ac..a1bb692663df8b61e228f6a86252e940917fc548 100644 (file)
@@ -50,7 +50,11 @@ __setup("aoe_iflist=", aoe_iflist_setup);
 static spinlock_t txlock;
 static struct sk_buff_head skbtxq;
 
-/* enters with txlock held */
+/* enters with txlock held
+ *
+ * Use __must_hold(&txlock) for sparse when upcoming patch adds it to
+ * compiler.h.
+ */
 static int
 tx(void)
 {
@@ -58,7 +62,10 @@ tx(void)
 
        while ((skb = skb_dequeue(&skbtxq))) {
                spin_unlock_irq(&txlock);
-               dev_queue_xmit(skb);
+               if (dev_queue_xmit(skb) == NET_XMIT_DROP && net_ratelimit())
+                       pr_warn("aoe: packet could not be sent on %s.  %s\n",
+                               skb->dev ? skb->dev->name : "netif",
+                               "consider increasing tx_queue_len");
                spin_lock_irq(&txlock);
        }
        return 0;