diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-10-26 18:46:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:37 -0500 |
commit | 5de4a473bda49554e4e9bd93b78f43c49a7ea69c (patch) | |
tree | 13a74efb896968e8b535561d5024e3cc8a2f19cc /net | |
parent | 2bdfe0baeca0e2750037b8fba71905c00ac3c515 (diff) |
netpoll queue cleanup
The beast had a long and not very happy history. At one
point, a friend (netdump) had asked that he open up a little.
Well, the friend was long gone now, and the beast had
this dangling piece hanging (netpoll_queue).
It wasn't hard to stitch the netpoll_queue back in
where it belonged and make everything tidy.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/netpoll.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 6b34c394672f..0d1de3c47a01 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -77,19 +77,6 @@ static void queue_process(void *p) | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | void netpoll_queue(struct sk_buff *skb) | ||
81 | { | ||
82 | struct net_device *dev = skb->dev; | ||
83 | struct netpoll_info *npinfo = dev->npinfo; | ||
84 | |||
85 | if (!npinfo) | ||
86 | kfree_skb(skb); | ||
87 | else { | ||
88 | skb_queue_tail(&npinfo->txq, skb); | ||
89 | schedule_work(&npinfo->tx_work); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, | 80 | static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, |
94 | unsigned short ulen, u32 saddr, u32 daddr) | 81 | unsigned short ulen, u32 saddr, u32 daddr) |
95 | { | 82 | { |
@@ -256,7 +243,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
256 | } | 243 | } |
257 | 244 | ||
258 | /* don't get messages out of order, and no recursion */ | 245 | /* don't get messages out of order, and no recursion */ |
259 | if ( !(np->drop == netpoll_queue && skb_queue_len(&npinfo->txq)) | 246 | if ( skb_queue_len(&npinfo->txq) == 0 |
260 | && npinfo->poll_owner != smp_processor_id() | 247 | && npinfo->poll_owner != smp_processor_id() |
261 | && netif_tx_trylock(dev)) { | 248 | && netif_tx_trylock(dev)) { |
262 | 249 | ||
@@ -277,11 +264,8 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
277 | } | 264 | } |
278 | 265 | ||
279 | if (status != NETDEV_TX_OK) { | 266 | if (status != NETDEV_TX_OK) { |
280 | /* requeue for later */ | 267 | skb_queue_tail(&npinfo->txq, skb); |
281 | if (np->drop) | 268 | schedule_work(&npinfo->tx_work); |
282 | np->drop(skb); | ||
283 | else | ||
284 | __kfree_skb(skb); | ||
285 | } | 269 | } |
286 | } | 270 | } |
287 | 271 | ||
@@ -809,4 +793,3 @@ EXPORT_SYMBOL(netpoll_setup); | |||
809 | EXPORT_SYMBOL(netpoll_cleanup); | 793 | EXPORT_SYMBOL(netpoll_cleanup); |
810 | EXPORT_SYMBOL(netpoll_send_udp); | 794 | EXPORT_SYMBOL(netpoll_send_udp); |
811 | EXPORT_SYMBOL(netpoll_poll); | 795 | EXPORT_SYMBOL(netpoll_poll); |
812 | EXPORT_SYMBOL(netpoll_queue); | ||