diff options
Diffstat (limited to 'drivers/block/aoe/aoenet.c')
-rw-r--r-- | drivers/block/aoe/aoenet.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index 162c6471275c..71d3ea8d3006 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c | |||
@@ -31,7 +31,7 @@ enum { | |||
31 | 31 | ||
32 | static char aoe_iflist[IFLISTSZ]; | 32 | static char aoe_iflist[IFLISTSZ]; |
33 | module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600); | 33 | module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600); |
34 | MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\""); | 34 | MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=dev1[,dev2...]"); |
35 | 35 | ||
36 | static wait_queue_head_t txwq; | 36 | static wait_queue_head_t txwq; |
37 | static struct ktstate kts; | 37 | static struct ktstate kts; |
@@ -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; |
@@ -119,8 +124,8 @@ aoenet_xmit(struct sk_buff_head *queue) | |||
119 | } | 124 | } |
120 | } | 125 | } |
121 | 126 | ||
122 | /* | 127 | /* |
123 | * (1) len doesn't include the header by default. I want this. | 128 | * (1) len doesn't include the header by default. I want this. |
124 | */ | 129 | */ |
125 | static int | 130 | static int |
126 | aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, struct net_device *orig_dev) | 131 | aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt, struct net_device *orig_dev) |