diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 3 | ||||
-rw-r--r-- | include/linux/netpoll.h | 34 | ||||
-rw-r--r-- | include/linux/x25.h | 12 |
4 files changed, 42 insertions, 11 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ba5d1236aa17..d6afd440cf7b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -41,7 +41,7 @@ | |||
41 | struct divert_blk; | 41 | struct divert_blk; |
42 | struct vlan_group; | 42 | struct vlan_group; |
43 | struct ethtool_ops; | 43 | struct ethtool_ops; |
44 | struct netpoll; | 44 | struct netpoll_info; |
45 | /* source back-compat hooks */ | 45 | /* source back-compat hooks */ |
46 | #define SET_ETHTOOL_OPS(netdev,ops) \ | 46 | #define SET_ETHTOOL_OPS(netdev,ops) \ |
47 | ( (netdev)->ethtool_ops = (ops) ) | 47 | ( (netdev)->ethtool_ops = (ops) ) |
@@ -468,7 +468,7 @@ struct net_device | |||
468 | unsigned char *haddr); | 468 | unsigned char *haddr); |
469 | int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); | 469 | int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); |
470 | #ifdef CONFIG_NETPOLL | 470 | #ifdef CONFIG_NETPOLL |
471 | struct netpoll *np; | 471 | struct netpoll_info *npinfo; |
472 | #endif | 472 | #endif |
473 | #ifdef CONFIG_NET_POLL_CONTROLLER | 473 | #ifdef CONFIG_NET_POLL_CONTROLLER |
474 | void (*poll_controller)(struct net_device *dev); | 474 | void (*poll_controller)(struct net_device *dev); |
diff --git a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h index baa83e757156..d9bceedfb3dc 100644 --- a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h +++ b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | |||
@@ -18,7 +18,6 @@ struct clusterip_config; | |||
18 | struct ipt_clusterip_tgt_info { | 18 | struct ipt_clusterip_tgt_info { |
19 | 19 | ||
20 | u_int32_t flags; | 20 | u_int32_t flags; |
21 | struct clusterip_config *config; | ||
22 | 21 | ||
23 | /* only relevant for new ones */ | 22 | /* only relevant for new ones */ |
24 | u_int8_t clustermac[6]; | 23 | u_int8_t clustermac[6]; |
@@ -27,6 +26,8 @@ struct ipt_clusterip_tgt_info { | |||
27 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; | 26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; |
28 | enum clusterip_hashmode hash_mode; | 27 | enum clusterip_hashmode hash_mode; |
29 | u_int32_t hash_initval; | 28 | u_int32_t hash_initval; |
29 | |||
30 | struct clusterip_config *config; | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | #endif /*_IPT_CLUSTERIP_H_target*/ | 33 | #endif /*_IPT_CLUSTERIP_H_target*/ |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index c0d8b90c5202..bcd0ac33f592 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -16,14 +16,19 @@ struct netpoll; | |||
16 | struct netpoll { | 16 | struct netpoll { |
17 | struct net_device *dev; | 17 | struct net_device *dev; |
18 | char dev_name[16], *name; | 18 | char dev_name[16], *name; |
19 | int rx_flags; | ||
20 | void (*rx_hook)(struct netpoll *, int, char *, int); | 19 | void (*rx_hook)(struct netpoll *, int, char *, int); |
21 | void (*drop)(struct sk_buff *skb); | 20 | void (*drop)(struct sk_buff *skb); |
22 | u32 local_ip, remote_ip; | 21 | u32 local_ip, remote_ip; |
23 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
24 | unsigned char local_mac[6], remote_mac[6]; | 23 | unsigned char local_mac[6], remote_mac[6]; |
24 | }; | ||
25 | |||
26 | struct netpoll_info { | ||
25 | spinlock_t poll_lock; | 27 | spinlock_t poll_lock; |
26 | int poll_owner; | 28 | int poll_owner; |
29 | int rx_flags; | ||
30 | spinlock_t rx_lock; | ||
31 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | ||
27 | }; | 32 | }; |
28 | 33 | ||
29 | void netpoll_poll(struct netpoll *np); | 34 | void netpoll_poll(struct netpoll *np); |
@@ -39,22 +44,35 @@ void netpoll_queue(struct sk_buff *skb); | |||
39 | #ifdef CONFIG_NETPOLL | 44 | #ifdef CONFIG_NETPOLL |
40 | static inline int netpoll_rx(struct sk_buff *skb) | 45 | static inline int netpoll_rx(struct sk_buff *skb) |
41 | { | 46 | { |
42 | return skb->dev->np && skb->dev->np->rx_flags && __netpoll_rx(skb); | 47 | struct netpoll_info *npinfo = skb->dev->npinfo; |
48 | unsigned long flags; | ||
49 | int ret = 0; | ||
50 | |||
51 | if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) | ||
52 | return 0; | ||
53 | |||
54 | spin_lock_irqsave(&npinfo->rx_lock, flags); | ||
55 | /* check rx_flags again with the lock held */ | ||
56 | if (npinfo->rx_flags && __netpoll_rx(skb)) | ||
57 | ret = 1; | ||
58 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | ||
59 | |||
60 | return ret; | ||
43 | } | 61 | } |
44 | 62 | ||
45 | static inline void netpoll_poll_lock(struct net_device *dev) | 63 | static inline void netpoll_poll_lock(struct net_device *dev) |
46 | { | 64 | { |
47 | if (dev->np) { | 65 | if (dev->npinfo) { |
48 | spin_lock(&dev->np->poll_lock); | 66 | spin_lock(&dev->npinfo->poll_lock); |
49 | dev->np->poll_owner = smp_processor_id(); | 67 | dev->npinfo->poll_owner = smp_processor_id(); |
50 | } | 68 | } |
51 | } | 69 | } |
52 | 70 | ||
53 | static inline void netpoll_poll_unlock(struct net_device *dev) | 71 | static inline void netpoll_poll_unlock(struct net_device *dev) |
54 | { | 72 | { |
55 | if (dev->np) { | 73 | if (dev->npinfo) { |
56 | spin_unlock(&dev->np->poll_lock); | 74 | dev->npinfo->poll_owner = -1; |
57 | dev->np->poll_owner = -1; | 75 | spin_unlock(&dev->npinfo->poll_lock); |
58 | } | 76 | } |
59 | } | 77 | } |
60 | 78 | ||
diff --git a/include/linux/x25.h b/include/linux/x25.h index 7531cfed5885..16d44931afa0 100644 --- a/include/linux/x25.h +++ b/include/linux/x25.h | |||
@@ -4,6 +4,8 @@ | |||
4 | * History | 4 | * History |
5 | * mar/20/00 Daniela Squassoni Disabling/enabling of facilities | 5 | * mar/20/00 Daniela Squassoni Disabling/enabling of facilities |
6 | * negotiation. | 6 | * negotiation. |
7 | * apr/02/05 Shaun Pereira Selective sub address matching with | ||
8 | * call user data | ||
7 | */ | 9 | */ |
8 | 10 | ||
9 | #ifndef X25_KERNEL_H | 11 | #ifndef X25_KERNEL_H |
@@ -16,6 +18,9 @@ | |||
16 | #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) | 18 | #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) |
17 | #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) | 19 | #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) |
18 | #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) | 20 | #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) |
21 | #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7) | ||
22 | #define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8) | ||
23 | #define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9) | ||
19 | 24 | ||
20 | /* | 25 | /* |
21 | * Values for {get,set}sockopt. | 26 | * Values for {get,set}sockopt. |
@@ -109,4 +114,11 @@ struct x25_causediag { | |||
109 | unsigned char diagnostic; | 114 | unsigned char diagnostic; |
110 | }; | 115 | }; |
111 | 116 | ||
117 | /* | ||
118 | * Further optional call user data match length selection | ||
119 | */ | ||
120 | struct x25_subaddr { | ||
121 | unsigned int cudmatchlength; | ||
122 | }; | ||
123 | |||
112 | #endif | 124 | #endif |