diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-03-14 23:48:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-17 15:47:22 -0400 |
commit | b6bacd550c33124ea76291bd84ac42c8d30767eb (patch) | |
tree | 19a5fb4f432141125a0bbc16254f8e83b57f3645 /include/linux/netpoll.h | |
parent | ff6076314339e079806d9d2f3de9c9b768e94db1 (diff) |
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>
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r-- | include/linux/netpoll.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 479d15c97770..154f9776056c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -39,7 +39,6 @@ struct netpoll { | |||
39 | struct netpoll_info { | 39 | struct netpoll_info { |
40 | atomic_t refcnt; | 40 | atomic_t refcnt; |
41 | 41 | ||
42 | unsigned long rx_flags; | ||
43 | spinlock_t rx_lock; | 42 | spinlock_t rx_lock; |
44 | struct semaphore dev_lock; | 43 | struct semaphore dev_lock; |
45 | struct list_head rx_np; /* netpolls that registered an rx_skb_hook */ | 44 | 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) | |||
99 | { | 98 | { |
100 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | 99 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); |
101 | 100 | ||
102 | return npinfo && (netpoll_rx_processing(npinfo) || npinfo->rx_flags); | 101 | return npinfo && netpoll_rx_processing(npinfo); |
103 | } | 102 | } |
104 | 103 | ||
105 | static inline bool netpoll_rx(struct sk_buff *skb) | 104 | static inline bool netpoll_rx(struct sk_buff *skb) |