diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-11-19 22:24:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:18 -0500 |
commit | 33f807ba0d9259e7c75c7a2ce8bd2787e5b540c7 (patch) | |
tree | 3ffeae5c29c5aa36605dfe7a00dc0f4f95ef9177 | |
parent | 0953864160bdd28dfe45fd46fa462b4d2d53cb96 (diff) |
[NETPOLL]: Kill NETPOLL_RX_DROP, set but never tested.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/netpoll.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index cf6acd3084a4..9e3aea0bd369 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -40,7 +40,6 @@ static atomic_t trapped; | |||
40 | 40 | ||
41 | #define USEC_PER_POLL 50 | 41 | #define USEC_PER_POLL 50 |
42 | #define NETPOLL_RX_ENABLED 1 | 42 | #define NETPOLL_RX_ENABLED 1 |
43 | #define NETPOLL_RX_DROP 2 | ||
44 | 43 | ||
45 | #define MAX_SKB_SIZE \ | 44 | #define MAX_SKB_SIZE \ |
46 | (MAX_UDP_CHUNK + sizeof(struct udphdr) + \ | 45 | (MAX_UDP_CHUNK + sizeof(struct udphdr) + \ |
@@ -128,13 +127,11 @@ static int poll_one_napi(struct netpoll_info *npinfo, | |||
128 | if (!test_bit(NAPI_STATE_SCHED, &napi->state)) | 127 | if (!test_bit(NAPI_STATE_SCHED, &napi->state)) |
129 | return budget; | 128 | return budget; |
130 | 129 | ||
131 | npinfo->rx_flags |= NETPOLL_RX_DROP; | ||
132 | atomic_inc(&trapped); | 130 | atomic_inc(&trapped); |
133 | 131 | ||
134 | work = napi->poll(napi, budget); | 132 | work = napi->poll(napi, budget); |
135 | 133 | ||
136 | atomic_dec(&trapped); | 134 | atomic_dec(&trapped); |
137 | npinfo->rx_flags &= ~NETPOLL_RX_DROP; | ||
138 | 135 | ||
139 | return budget - work; | 136 | return budget - work; |
140 | } | 137 | } |
@@ -475,7 +472,7 @@ int __netpoll_rx(struct sk_buff *skb) | |||
475 | if (skb->dev->type != ARPHRD_ETHER) | 472 | if (skb->dev->type != ARPHRD_ETHER) |
476 | goto out; | 473 | goto out; |
477 | 474 | ||
478 | /* check if netpoll clients need ARP */ | 475 | /* if receive ARP during middle of NAPI poll, then queue */ |
479 | if (skb->protocol == htons(ETH_P_ARP) && | 476 | if (skb->protocol == htons(ETH_P_ARP) && |
480 | atomic_read(&trapped)) { | 477 | atomic_read(&trapped)) { |
481 | skb_queue_tail(&npi->arp_tx, skb); | 478 | skb_queue_tail(&npi->arp_tx, skb); |
@@ -537,6 +534,9 @@ int __netpoll_rx(struct sk_buff *skb) | |||
537 | return 1; | 534 | return 1; |
538 | 535 | ||
539 | out: | 536 | out: |
537 | /* If packet received while already in poll then just | ||
538 | * silently drop. | ||
539 | */ | ||
540 | if (atomic_read(&trapped)) { | 540 | if (atomic_read(&trapped)) { |
541 | kfree_skb(skb); | 541 | kfree_skb(skb); |
542 | return 1; | 542 | return 1; |