netpoll: Don't drop all received packets.

Change the strategy of netpoll from dropping all packets received
during netpoll_poll_dev to calling napi poll with a budget of 0
(to avoid processing drivers rx queue), and to ignore packets received
with netif_rx (those will safely be placed on the backlog queue).

All of the netpoll supporting drivers have been reviewed to ensure
either thay use netif_rx or that a budget of 0 is supported by their
napi poll routine and that a budget of 0 will not process the drivers
rx queues.

Not dropping packets makes NETPOLL_RX_DROP unnecesary so it is removed.

npinfo->rx_flags is removed  as rx_flags with just the NETPOLL_RX_ENABLED
flag becomes just a redundant mirror of list_empty(&npinfo->rx_np).

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric W. Biederman 2014-03-14 20:48:28 -07:00 committed by David S. Miller
parent ff60763143
commit b6bacd550c
2 changed files with 7 additions and 13 deletions

View file

@ -39,7 +39,6 @@ struct netpoll {
struct netpoll_info {
atomic_t refcnt;
unsigned long rx_flags;
spinlock_t rx_lock;
struct semaphore dev_lock;
struct list_head rx_np; /* netpolls that registered an rx_skb_hook */
@ -99,7 +98,7 @@ static inline bool netpoll_rx_on(struct sk_buff *skb)
{
struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo);
return npinfo && (netpoll_rx_processing(npinfo) || npinfo->rx_flags);
return npinfo && netpoll_rx_processing(npinfo);
}
static inline bool netpoll_rx(struct sk_buff *skb)