diff options
author | Ed Cashin <ecashin@coraid.com> | 2012-12-17 19:03:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:23 -0500 |
commit | 4e78dd144b865162626f811d1097b6d181ec6a31 (patch) | |
tree | 748745c212c7750eff7fef001f128075713c2d5b /drivers/block/aoe | |
parent | 662a889608dfabbb1b4954b172a6872a25dc8f90 (diff) |
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 <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>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoenet.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index 162c6471275..24eca2bf941 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c | |||
@@ -52,13 +52,18 @@ static struct sk_buff_head skbtxq; | |||
52 | 52 | ||
53 | /* enters with txlock held */ | 53 | /* enters with txlock held */ |
54 | static int | 54 | static int |
55 | tx(void) | 55 | tx(void) __must_hold(&txlock) |
56 | { | 56 | { |
57 | struct sk_buff *skb; | 57 | struct sk_buff *skb; |
58 | struct net_device *ifp; | ||
58 | 59 | ||
59 | while ((skb = skb_dequeue(&skbtxq))) { | 60 | while ((skb = skb_dequeue(&skbtxq))) { |
60 | spin_unlock_irq(&txlock); | 61 | spin_unlock_irq(&txlock); |
61 | dev_queue_xmit(skb); | 62 | ifp = skb->dev; |
63 | if (dev_queue_xmit(skb) == NET_XMIT_DROP && net_ratelimit()) | ||
64 | pr_warn("aoe: packet could not be sent on %s. %s\n", | ||
65 | ifp ? ifp->name : "netif", | ||
66 | "consider increasing tx_queue_len"); | ||
62 | spin_lock_irq(&txlock); | 67 | spin_lock_irq(&txlock); |
63 | } | 68 | } |
64 | return 0; | 69 | return 0; |