summaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-10-26 15:46:55 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:22:37 -0800
commit5de4a473bda49554e4e9bd93b78f43c49a7ea69c (patch)
tree13a74efb896968e8b535561d5024e3cc8a2f19cc /net/core/netpoll.c
parent2bdfe0baeca0e2750037b8fba71905c00ac3c515 (diff)
downloadlinux-5de4a473bda49554e4e9bd93b78f43c49a7ea69c.tar.gz
linux-5de4a473bda49554e4e9bd93b78f43c49a7ea69c.tar.bz2
linux-5de4a473bda49554e4e9bd93b78f43c49a7ea69c.zip
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/core/netpoll.c')
-rw-r--r--net/core/netpoll.c23
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)
}
}
-void netpoll_queue(struct sk_buff *skb)
-{
- struct net_device *dev = skb->dev;
- struct netpoll_info *npinfo = dev->npinfo;
-
- if (!npinfo)
- kfree_skb(skb);
- else {
- skb_queue_tail(&npinfo->txq, skb);
- schedule_work(&npinfo->tx_work);
- }
-}
-
static int checksum_udp(struct sk_buff *skb, struct udphdr *uh,
unsigned short ulen, u32 saddr, u32 daddr)
{
@@ -256,7 +243,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
}
/* don't get messages out of order, and no recursion */
- if ( !(np->drop == netpoll_queue && skb_queue_len(&npinfo->txq))
+ if ( skb_queue_len(&npinfo->txq) == 0
&& npinfo->poll_owner != smp_processor_id()
&& netif_tx_trylock(dev)) {
@@ -277,11 +264,8 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
}
if (status != NETDEV_TX_OK) {
- /* requeue for later */
- if (np->drop)
- np->drop(skb);
- else
- __kfree_skb(skb);
+ skb_queue_tail(&npinfo->txq, skb);
+ schedule_work(&npinfo->tx_work);
}
}
@@ -809,4 +793,3 @@ EXPORT_SYMBOL(netpoll_setup);
EXPORT_SYMBOL(netpoll_cleanup);
EXPORT_SYMBOL(netpoll_send_udp);
EXPORT_SYMBOL(netpoll_poll);
-EXPORT_SYMBOL(netpoll_queue);