diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:54:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:54:01 -0500 |
commit | 0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (patch) | |
tree | 62e616f97a4762d8e75bf732e4827af2d15d52c5 /include/linux/netpoll.h | |
parent | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (diff) | |
parent | 85040bcb4643cba578839e953f25e2d1965d83d0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
[IPV6] ADDRLABEL: Fix double free on label deletion.
[PPP]: Sparse warning fixes.
[IPV4] fib_trie: remove unneeded NULL check
[IPV4] fib_trie: More whitespace cleanup.
[NET_SCHED]: Use nla_policy for attribute validation in ematches
[NET_SCHED]: Use nla_policy for attribute validation in actions
[NET_SCHED]: Use nla_policy for attribute validation in classifiers
[NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
[NET_SCHED]: sch_api: introduce constant for rate table size
[NET_SCHED]: Use typeful attribute parsing helpers
[NET_SCHED]: Use typeful attribute construction helpers
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
[NET_SCHED]: Use nla_nest_start/nla_nest_end
[NET_SCHED]: Propagate nla_parse return value
[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
[NET_SCHED]: act_api: use nlmsg_parse
[NET_SCHED]: act_api: fix netlink API conversion bug
[NET_SCHED]: sch_netem: use nla_parse_nested_compat
[NET_SCHED]: sch_atm: fix format string warning
[NETNS]: Add namespace for ICMP replying code.
...
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r-- | include/linux/netpoll.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 20250d963d72..a0525a1f4715 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -20,12 +20,11 @@ struct netpoll { | |||
20 | 20 | ||
21 | u32 local_ip, remote_ip; | 21 | u32 local_ip, remote_ip; |
22 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
23 | u8 local_mac[ETH_ALEN], remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | struct netpoll_info { | 26 | struct netpoll_info { |
27 | atomic_t refcnt; | 27 | atomic_t refcnt; |
28 | int rx_flags; | ||
29 | spinlock_t rx_lock; | 28 | spinlock_t rx_lock; |
30 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 29 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
31 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | 30 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ |
@@ -51,12 +50,12 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
51 | unsigned long flags; | 50 | unsigned long flags; |
52 | int ret = 0; | 51 | int ret = 0; |
53 | 52 | ||
54 | if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) | 53 | if (!npinfo || !npinfo->rx_np) |
55 | return 0; | 54 | return 0; |
56 | 55 | ||
57 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 56 | spin_lock_irqsave(&npinfo->rx_lock, flags); |
58 | /* check rx_flags again with the lock held */ | 57 | /* check rx_np again with the lock held */ |
59 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 58 | if (npinfo->rx_np && __netpoll_rx(skb)) |
60 | ret = 1; | 59 | ret = 1; |
61 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 60 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); |
62 | 61 | ||