diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-13 23:48:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-13 23:48:46 -0400 |
commit | 7a49efae71397cf7e9299bbb22b2d12f7cf12428 (patch) | |
tree | d4e47542448b0018f4f684e4097efb05db6bd355 /include | |
parent | 0ff8285075a1242dbc969b6b4b1719d692931a02 (diff) | |
parent | 877acedc0d3ea07f7b36573ed2f1f479c2c1eefd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
netns: Fix crash by making igmp per namespace
bnx2x: Version update
bnx2x: Checkpatch compliance
bnx2x: Spelling mistakes
bnx2x: Minor code improvements
bnx2x: Driver info
bnx2x: 1G LED does not turn off
bnx2x: 8073 PHY changes
bnx2x: Change GPIO for any port
bnx2x: Pause settings
bnx2x: Link order with external PHY
bnx2x: No LRO without Rx checksum
bnx2x: Wrong structure size
bnx2x: WoL capability
bnx2x: Clearing MAC addresses filters
bnx2x: Delay in while loops
bnx2x: PBA Table Page Alignment Workaround
bnx2x: Self-test false positive
bnx2x: Memory allocation
bnx2x: HW attention lock
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | include/net/ip6_route.h | 6 | ||||
-rw-r--r-- | include/net/ip_vs.h | 32 | ||||
-rw-r--r-- | include/net/pkt_sched.h | 5 |
4 files changed, 35 insertions, 14 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cfcc45b3bef0..358661c9990e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -901,7 +901,7 @@ extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); | |||
901 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) | 901 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) |
902 | { | 902 | { |
903 | if (len > skb_headlen(skb) && | 903 | if (len > skb_headlen(skb) && |
904 | !__pskb_pull_tail(skb, len-skb_headlen(skb))) | 904 | !__pskb_pull_tail(skb, len - skb_headlen(skb))) |
905 | return NULL; | 905 | return NULL; |
906 | skb->len -= len; | 906 | skb->len -= len; |
907 | return skb->data += len; | 907 | return skb->data += len; |
@@ -918,7 +918,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) | |||
918 | return 1; | 918 | return 1; |
919 | if (unlikely(len > skb->len)) | 919 | if (unlikely(len > skb->len)) |
920 | return 0; | 920 | return 0; |
921 | return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL; | 921 | return __pskb_pull_tail(skb, len - skb_headlen(skb)) != NULL; |
922 | } | 922 | } |
923 | 923 | ||
924 | /** | 924 | /** |
@@ -1321,7 +1321,7 @@ static inline int skb_padto(struct sk_buff *skb, unsigned int len) | |||
1321 | unsigned int size = skb->len; | 1321 | unsigned int size = skb->len; |
1322 | if (likely(size >= len)) | 1322 | if (likely(size >= len)) |
1323 | return 0; | 1323 | return 0; |
1324 | return skb_pad(skb, len-size); | 1324 | return skb_pad(skb, len - size); |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | static inline int skb_add_data(struct sk_buff *skb, | 1327 | static inline int skb_add_data(struct sk_buff *skb, |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 2f8b3c06a101..bc391ba101e9 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -38,11 +38,6 @@ struct route_info { | |||
38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
39 | 39 | ||
40 | 40 | ||
41 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
42 | extern struct rt6_info *ip6_prohibit_entry; | ||
43 | extern struct rt6_info *ip6_blk_hole_entry; | ||
44 | #endif | ||
45 | |||
46 | extern void ip6_route_input(struct sk_buff *skb); | 41 | extern void ip6_route_input(struct sk_buff *skb); |
47 | 42 | ||
48 | extern struct dst_entry * ip6_route_output(struct net *net, | 43 | extern struct dst_entry * ip6_route_output(struct net *net, |
@@ -118,7 +113,6 @@ extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | |||
118 | extern void rt6_ifdown(struct net *net, struct net_device *dev); | 113 | extern void rt6_ifdown(struct net *net, struct net_device *dev); |
119 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); | 114 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); |
120 | 115 | ||
121 | extern rwlock_t rt6_lock; | ||
122 | 116 | ||
123 | /* | 117 | /* |
124 | * Store a destination cache entry in a socket | 118 | * Store a destination cache entry in a socket |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index cbb59ebed4ae..7312c3dd309f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -140,8 +140,24 @@ struct ip_vs_seq { | |||
140 | 140 | ||
141 | 141 | ||
142 | /* | 142 | /* |
143 | * IPVS statistics object | 143 | * IPVS statistics objects |
144 | */ | 144 | */ |
145 | struct ip_vs_estimator { | ||
146 | struct list_head list; | ||
147 | |||
148 | u64 last_inbytes; | ||
149 | u64 last_outbytes; | ||
150 | u32 last_conns; | ||
151 | u32 last_inpkts; | ||
152 | u32 last_outpkts; | ||
153 | |||
154 | u32 cps; | ||
155 | u32 inpps; | ||
156 | u32 outpps; | ||
157 | u32 inbps; | ||
158 | u32 outbps; | ||
159 | }; | ||
160 | |||
145 | struct ip_vs_stats | 161 | struct ip_vs_stats |
146 | { | 162 | { |
147 | __u32 conns; /* connections scheduled */ | 163 | __u32 conns; /* connections scheduled */ |
@@ -156,7 +172,15 @@ struct ip_vs_stats | |||
156 | __u32 inbps; /* current in byte rate */ | 172 | __u32 inbps; /* current in byte rate */ |
157 | __u32 outbps; /* current out byte rate */ | 173 | __u32 outbps; /* current out byte rate */ |
158 | 174 | ||
175 | /* | ||
176 | * Don't add anything before the lock, because we use memcpy() to copy | ||
177 | * the members before the lock to struct ip_vs_stats_user in | ||
178 | * ip_vs_ctl.c. | ||
179 | */ | ||
180 | |||
159 | spinlock_t lock; /* spin lock */ | 181 | spinlock_t lock; /* spin lock */ |
182 | |||
183 | struct ip_vs_estimator est; /* estimator */ | ||
160 | }; | 184 | }; |
161 | 185 | ||
162 | struct dst_entry; | 186 | struct dst_entry; |
@@ -440,7 +464,7 @@ struct ip_vs_app | |||
440 | */ | 464 | */ |
441 | extern const char *ip_vs_proto_name(unsigned proto); | 465 | extern const char *ip_vs_proto_name(unsigned proto); |
442 | extern void ip_vs_init_hash_table(struct list_head *table, int rows); | 466 | extern void ip_vs_init_hash_table(struct list_head *table, int rows); |
443 | #define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table(t, sizeof(t)/sizeof(t[0])) | 467 | #define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table((t), ARRAY_SIZE((t))) |
444 | 468 | ||
445 | #define IP_VS_APP_TYPE_FTP 1 | 469 | #define IP_VS_APP_TYPE_FTP 1 |
446 | 470 | ||
@@ -620,7 +644,7 @@ extern int sysctl_ip_vs_expire_quiescent_template; | |||
620 | extern int sysctl_ip_vs_sync_threshold[2]; | 644 | extern int sysctl_ip_vs_sync_threshold[2]; |
621 | extern int sysctl_ip_vs_nat_icmp_send; | 645 | extern int sysctl_ip_vs_nat_icmp_send; |
622 | extern struct ip_vs_stats ip_vs_stats; | 646 | extern struct ip_vs_stats ip_vs_stats; |
623 | extern struct ctl_path net_vs_ctl_path[]; | 647 | extern const struct ctl_path net_vs_ctl_path[]; |
624 | 648 | ||
625 | extern struct ip_vs_service * | 649 | extern struct ip_vs_service * |
626 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); | 650 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); |
@@ -659,7 +683,7 @@ extern void ip_vs_sync_conn(struct ip_vs_conn *cp); | |||
659 | /* | 683 | /* |
660 | * IPVS rate estimator prototypes (from ip_vs_est.c) | 684 | * IPVS rate estimator prototypes (from ip_vs_est.c) |
661 | */ | 685 | */ |
662 | extern int ip_vs_new_estimator(struct ip_vs_stats *stats); | 686 | extern void ip_vs_new_estimator(struct ip_vs_stats *stats); |
663 | extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); | 687 | extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); |
664 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); | 688 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); |
665 | 689 | ||
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 6affcfaa123e..853fe83d9f37 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -89,7 +89,10 @@ extern void __qdisc_run(struct Qdisc *q); | |||
89 | 89 | ||
90 | static inline void qdisc_run(struct Qdisc *q) | 90 | static inline void qdisc_run(struct Qdisc *q) |
91 | { | 91 | { |
92 | if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) | 92 | struct netdev_queue *txq = q->dev_queue; |
93 | |||
94 | if (!netif_tx_queue_stopped(txq) && | ||
95 | !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) | ||
93 | __qdisc_run(q); | 96 | __qdisc_run(q); |
94 | } | 97 | } |
95 | 98 | ||