diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:14:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:14:42 -0400 |
commit | 152a6a9da1bd3ed5dcbbf6ff17c7ebde0eb9a754 (patch) | |
tree | cad354802870b7d4bc0402a6a6da44bd1f610bc6 /include | |
parent | cd9bb7e7367c03400d6e918fd3502820fc3b9084 (diff) | |
parent | 80787ebc2bbd8e675d8b9ff8cfa40f15134feebe (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
[IPV4] SNMP: Support OutMcastPkts and OutBcastPkts
[IPV4] SNMP: Support InMcastPkts and InBcastPkts
[IPV4] SNMP: Support InTruncatedPkts
[IPV4] SNMP: Support InNoRoutes
[SNMP]: Add definitions for {In,Out}BcastPkts
[TCP] FRTO: RFC4138 allows Nagle override when new data must be sent
[TCP] FRTO: Delay skb available check until it's mandatory
[XFRM]: Restrict upper layer information by bundle.
[TCP]: Catch skb with S+L bugs earlier
[PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo
[L2TP]: Add the ability to autoload a pppox protocol module.
[SKB]: Introduce skb_queue_walk_safe()
[AF_IUCV/IUCV]: smp_call_function deadlock
[IPV6]: Fix slab corruption running ip6sic
[TCP]: Update references in two old comments
[XFRM]: Export SPD info
[IPV6]: Track device renames in snmp6.
[SCTP]: Fix sctp_getsockopt_local_addrs_old() to use local storage.
[NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats.
[NETPOLL]: Remove CONFIG_NETPOLL_RX
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 9 | ||||
-rw-r--r-- | include/linux/skbuff.h | 5 | ||||
-rw-r--r-- | include/linux/snmp.h | 2 | ||||
-rw-r--r-- | include/linux/xfrm.h | 35 | ||||
-rw-r--r-- | include/net/flow.h | 6 | ||||
-rw-r--r-- | include/net/iucv/iucv.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 9 | ||||
-rw-r--r-- | include/net/xfrm.h | 23 |
8 files changed, 81 insertions, 10 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e027a3750a77..ac0c92b1e002 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -325,7 +325,6 @@ struct net_device | |||
325 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | 325 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ |
326 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ | 326 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ |
327 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | 327 | #define NETIF_F_LLTX 4096 /* LockLess TX */ |
328 | #define NETIF_F_INTERNAL_STATS 8192 /* Use stats structure in net_device */ | ||
329 | 328 | ||
330 | /* Segmentation offload features */ | 329 | /* Segmentation offload features */ |
331 | #define NETIF_F_GSO_SHIFT 16 | 330 | #define NETIF_F_GSO_SHIFT 16 |
@@ -654,8 +653,10 @@ static inline void netif_start_queue(struct net_device *dev) | |||
654 | static inline void netif_wake_queue(struct net_device *dev) | 653 | static inline void netif_wake_queue(struct net_device *dev) |
655 | { | 654 | { |
656 | #ifdef CONFIG_NETPOLL_TRAP | 655 | #ifdef CONFIG_NETPOLL_TRAP |
657 | if (netpoll_trap()) | 656 | if (netpoll_trap()) { |
657 | clear_bit(__LINK_STATE_XOFF, &dev->state); | ||
658 | return; | 658 | return; |
659 | } | ||
659 | #endif | 660 | #endif |
660 | if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) | 661 | if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) |
661 | __netif_schedule(dev); | 662 | __netif_schedule(dev); |
@@ -663,10 +664,6 @@ static inline void netif_wake_queue(struct net_device *dev) | |||
663 | 664 | ||
664 | static inline void netif_stop_queue(struct net_device *dev) | 665 | static inline void netif_stop_queue(struct net_device *dev) |
665 | { | 666 | { |
666 | #ifdef CONFIG_NETPOLL_TRAP | ||
667 | if (netpoll_trap()) | ||
668 | return; | ||
669 | #endif | ||
670 | set_bit(__LINK_STATE_XOFF, &dev->state); | 667 | set_bit(__LINK_STATE_XOFF, &dev->state); |
671 | } | 668 | } |
672 | 669 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2694cb3ca763..253a2b9be9d6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1471,6 +1471,11 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | |||
1471 | prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ | 1471 | prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ |
1472 | skb = skb->next) | 1472 | skb = skb->next) |
1473 | 1473 | ||
1474 | #define skb_queue_walk_safe(queue, skb, tmp) \ | ||
1475 | for (skb = (queue)->next, tmp = skb->next; \ | ||
1476 | skb != (struct sk_buff *)(queue); \ | ||
1477 | skb = tmp, tmp = skb->next) | ||
1478 | |||
1474 | #define skb_queue_reverse_walk(queue, skb) \ | 1479 | #define skb_queue_reverse_walk(queue, skb) \ |
1475 | for (skb = (queue)->prev; \ | 1480 | for (skb = (queue)->prev; \ |
1476 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ | 1481 | prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index 854aa6b543f1..802b3a38b041 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -40,6 +40,8 @@ enum | |||
40 | IPSTATS_MIB_FRAGCREATES, /* FragCreates */ | 40 | IPSTATS_MIB_FRAGCREATES, /* FragCreates */ |
41 | IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */ | 41 | IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */ |
42 | IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */ | 42 | IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */ |
43 | IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */ | ||
44 | IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */ | ||
43 | __IPSTATS_MIB_MAX | 45 | __IPSTATS_MIB_MAX |
44 | }; | 46 | }; |
45 | 47 | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 9c656a5cf842..a5d53e0fe152 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -185,6 +185,11 @@ enum { | |||
185 | #define XFRM_MSG_NEWSADINFO XFRM_MSG_NEWSADINFO | 185 | #define XFRM_MSG_NEWSADINFO XFRM_MSG_NEWSADINFO |
186 | XFRM_MSG_GETSADINFO, | 186 | XFRM_MSG_GETSADINFO, |
187 | #define XFRM_MSG_GETSADINFO XFRM_MSG_GETSADINFO | 187 | #define XFRM_MSG_GETSADINFO XFRM_MSG_GETSADINFO |
188 | |||
189 | XFRM_MSG_NEWSPDINFO, | ||
190 | #define XFRM_MSG_NEWSPDINFO XFRM_MSG_NEWSPDINFO | ||
191 | XFRM_MSG_GETSPDINFO, | ||
192 | #define XFRM_MSG_GETSPDINFO XFRM_MSG_GETSPDINFO | ||
188 | __XFRM_MSG_MAX | 193 | __XFRM_MSG_MAX |
189 | }; | 194 | }; |
190 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | 195 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) |
@@ -290,6 +295,36 @@ enum xfrm_sadattr_type_t { | |||
290 | #define XFRMA_SAD_MAX (__XFRMA_SAD_MAX - 1) | 295 | #define XFRMA_SAD_MAX (__XFRMA_SAD_MAX - 1) |
291 | }; | 296 | }; |
292 | 297 | ||
298 | /* SPD Table filter flags */ | ||
299 | enum xfrm_spd_ftype_t { | ||
300 | XFRM_SPD_UNSPEC, | ||
301 | XFRM_SPD_HMASK=1, | ||
302 | XFRM_SPD_HMAX=2, | ||
303 | XFRM_SPD_ICNT=4, | ||
304 | XFRM_SPD_OCNT=8, | ||
305 | XFRM_SPD_FCNT=16, | ||
306 | XFRM_SPD_ISCNT=32, | ||
307 | XFRM_SPD_OSCNT=64, | ||
308 | XFRM_SPD_FSCNT=128, | ||
309 | __XFRM_SPD_MAX | ||
310 | |||
311 | #define XFRM_SPD_MAX (__XFRM_SPD_MAX - 1) | ||
312 | }; | ||
313 | enum xfrm_spdattr_type_t { | ||
314 | XFRMA_SPD_UNSPEC, | ||
315 | XFRMA_SPDHMASK, | ||
316 | XFRMA_SPDHMAX, | ||
317 | XFRMA_SPDICNT, | ||
318 | XFRMA_SPDOCNT, | ||
319 | XFRMA_SPDFCNT, | ||
320 | XFRMA_SPDISCNT, | ||
321 | XFRMA_SPDOSCNT, | ||
322 | XFRMA_SPDFSCNT, | ||
323 | __XFRMA_SPD_MAX | ||
324 | |||
325 | #define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1) | ||
326 | }; | ||
327 | |||
293 | struct xfrm_usersa_info { | 328 | struct xfrm_usersa_info { |
294 | struct xfrm_selector sel; | 329 | struct xfrm_selector sel; |
295 | struct xfrm_id id; | 330 | struct xfrm_id id; |
diff --git a/include/net/flow.h b/include/net/flow.h index ce4b10d8b412..f3cc1f812619 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -97,4 +97,10 @@ extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, | |||
97 | extern void flow_cache_flush(void); | 97 | extern void flow_cache_flush(void); |
98 | extern atomic_t flow_cache_genid; | 98 | extern atomic_t flow_cache_genid; |
99 | 99 | ||
100 | static inline int flow_cache_uli_match(struct flowi *fl1, struct flowi *fl2) | ||
101 | { | ||
102 | return (fl1->proto == fl2->proto && | ||
103 | !memcmp(&fl1->uli_u, &fl2->uli_u, sizeof(fl1->uli_u))); | ||
104 | } | ||
105 | |||
100 | #endif | 106 | #endif |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 746e7416261e..fd70adbb3566 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * completed a register, it can exploit the other functions. | 16 | * completed a register, it can exploit the other functions. |
17 | * For furthur reference on all IUCV functionality, refer to the | 17 | * For furthur reference on all IUCV functionality, refer to the |
18 | * CP Programming Services book, also available on the web thru | 18 | * CP Programming Services book, also available on the web thru |
19 | * www.ibm.com/s390/vm/pubs, manual # SC24-5760 | 19 | * www.vm.ibm.com/pubs, manual # SC24-6084 |
20 | * | 20 | * |
21 | * Definition of Return Codes | 21 | * Definition of Return Codes |
22 | * - All positive return codes including zero are reflected back | 22 | * - All positive return codes including zero are reflected back |
diff --git a/include/net/tcp.h b/include/net/tcp.h index a385797f160a..ef8f9d4dae85 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -736,9 +736,7 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk) | |||
736 | 736 | ||
737 | static inline void tcp_sync_left_out(struct tcp_sock *tp) | 737 | static inline void tcp_sync_left_out(struct tcp_sock *tp) |
738 | { | 738 | { |
739 | if (tp->rx_opt.sack_ok && | 739 | BUG_ON(tp->sacked_out + tp->lost_out > tp->packets_out); |
740 | (tp->sacked_out >= tp->packets_out - tp->lost_out)) | ||
741 | tp->sacked_out = tp->packets_out - tp->lost_out; | ||
742 | tp->left_out = tp->sacked_out + tp->lost_out; | 740 | tp->left_out = tp->sacked_out + tp->lost_out; |
743 | } | 741 | } |
744 | 742 | ||
@@ -1201,9 +1199,14 @@ static inline struct sk_buff *tcp_send_head(struct sock *sk) | |||
1201 | 1199 | ||
1202 | static inline void tcp_advance_send_head(struct sock *sk, struct sk_buff *skb) | 1200 | static inline void tcp_advance_send_head(struct sock *sk, struct sk_buff *skb) |
1203 | { | 1201 | { |
1202 | struct tcp_sock *tp = tcp_sk(sk); | ||
1203 | |||
1204 | sk->sk_send_head = skb->next; | 1204 | sk->sk_send_head = skb->next; |
1205 | if (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue) | 1205 | if (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue) |
1206 | sk->sk_send_head = NULL; | 1206 | sk->sk_send_head = NULL; |
1207 | /* Don't override Nagle indefinately with F-RTO */ | ||
1208 | if (tp->frto_counter == 2) | ||
1209 | tp->frto_counter = 3; | ||
1207 | } | 1210 | } |
1208 | 1211 | ||
1209 | static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked) | 1212 | static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked) |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 8287081d77f2..66c2d3eec03c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -423,6 +423,18 @@ struct xfrm_sadinfo | |||
423 | u32 sadhmcnt; /* max allowed hash bkts */ | 423 | u32 sadhmcnt; /* max allowed hash bkts */ |
424 | u32 sadcnt; /* current running count */ | 424 | u32 sadcnt; /* current running count */ |
425 | }; | 425 | }; |
426 | |||
427 | struct xfrm_spdinfo | ||
428 | { | ||
429 | u32 incnt; | ||
430 | u32 outcnt; | ||
431 | u32 fwdcnt; | ||
432 | u32 inscnt; | ||
433 | u32 outscnt; | ||
434 | u32 fwdscnt; | ||
435 | u32 spdhcnt; | ||
436 | u32 spdhmcnt; | ||
437 | }; | ||
426 | #ifdef CONFIG_AUDITSYSCALL | 438 | #ifdef CONFIG_AUDITSYSCALL |
427 | extern void xfrm_audit_log(uid_t auid, u32 secid, int type, int result, | 439 | extern void xfrm_audit_log(uid_t auid, u32 secid, int type, int result, |
428 | struct xfrm_policy *xp, struct xfrm_state *x); | 440 | struct xfrm_policy *xp, struct xfrm_state *x); |
@@ -591,6 +603,10 @@ struct xfrm_dst | |||
591 | struct rt6_info rt6; | 603 | struct rt6_info rt6; |
592 | } u; | 604 | } u; |
593 | struct dst_entry *route; | 605 | struct dst_entry *route; |
606 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
607 | struct flowi *origin; | ||
608 | struct xfrm_selector *partner; | ||
609 | #endif | ||
594 | u32 genid; | 610 | u32 genid; |
595 | u32 route_mtu_cached; | 611 | u32 route_mtu_cached; |
596 | u32 child_mtu_cached; | 612 | u32 child_mtu_cached; |
@@ -603,6 +619,12 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | |||
603 | dst_release(xdst->route); | 619 | dst_release(xdst->route); |
604 | if (likely(xdst->u.dst.xfrm)) | 620 | if (likely(xdst->u.dst.xfrm)) |
605 | xfrm_state_put(xdst->u.dst.xfrm); | 621 | xfrm_state_put(xdst->u.dst.xfrm); |
622 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
623 | kfree(xdst->origin); | ||
624 | xdst->origin = NULL; | ||
625 | kfree(xdst->partner); | ||
626 | xdst->partner = NULL; | ||
627 | #endif | ||
606 | } | 628 | } |
607 | 629 | ||
608 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); | 630 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); |
@@ -946,6 +968,7 @@ extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); | |||
946 | extern int xfrm_state_delete(struct xfrm_state *x); | 968 | extern int xfrm_state_delete(struct xfrm_state *x); |
947 | extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); | 969 | extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); |
948 | extern void xfrm_sad_getinfo(struct xfrm_sadinfo *si); | 970 | extern void xfrm_sad_getinfo(struct xfrm_sadinfo *si); |
971 | extern void xfrm_spd_getinfo(struct xfrm_spdinfo *si); | ||
949 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); | 972 | extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); |
950 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); | 973 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); |
951 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); | 974 | extern void xfrm_replay_notify(struct xfrm_state *x, int event); |