diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-13 12:04:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-13 12:04:48 -0500 |
commit | 31083eba370fbc5d544ac2fe67ca549c0aa2bdf7 (patch) | |
tree | 9531e720d8d3cd8d82b7a3e4d2a1c6c306e769b4 /include | |
parent | a7fe77161da48a74c60dc19fc4ca3a73ab761d37 (diff) | |
parent | 53756524e42a71011f5ae6410d6ac386bf3a9e7b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
[NETFILTER]: xt_time should not assume CONFIG_KTIME_SCALAR
[NET]: Move unneeded data to initdata section.
[NET]: Cleanup pernet operation without CONFIG_NET_NS
[TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()
[MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.
[NETFILTER]: bridge: fix double POSTROUTING hook invocation
[NETFILTER]: Consolidate nf_sockopt and compat_nf_sockopt
[NETFILTER]: nf_nat: fix memset error
[INET]: Use list_head-s in inetpeer.c
[IPVS]: Remove unused exports.
[NET]: Unexport sysctl_{r,w}mem_max.
[TG3]: Update version to 3.86
[TG3]: MII => TP
[TG3]: Add A1 revs
[TG3]: Increase the PCI MRRS
[TG3]: Prescaler fix
[TG3]: Limit 5784 / 5764 to MAC LED mode
[TG3]: Disable GPHY autopowerdown
[TG3]: CPMU adjustments for loopback tests
[TG3]: Fix nvram selftest failures
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/net.h | 8 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 2 | ||||
-rw-r--r-- | include/net/inet_common.h | 4 | ||||
-rw-r--r-- | include/net/inetpeer.h | 2 | ||||
-rw-r--r-- | include/net/net_namespace.h | 2 | ||||
-rw-r--r-- | include/net/sctp/command.h | 1 | ||||
-rw-r--r-- | include/net/sctp/constants.h | 3 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 5 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 22 |
9 files changed, 31 insertions, 18 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index dd79cdb8c4cf..596131ea46f4 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -95,6 +95,12 @@ enum sock_type { | |||
95 | 95 | ||
96 | #endif /* ARCH_HAS_SOCKET_TYPES */ | 96 | #endif /* ARCH_HAS_SOCKET_TYPES */ |
97 | 97 | ||
98 | enum sock_shutdown_cmd { | ||
99 | SHUT_RD = 0, | ||
100 | SHUT_WR = 1, | ||
101 | SHUT_RDWR = 2, | ||
102 | }; | ||
103 | |||
98 | /** | 104 | /** |
99 | * struct socket - general BSD socket | 105 | * struct socket - general BSD socket |
100 | * @state: socket state (%SS_CONNECTED, etc) | 106 | * @state: socket state (%SS_CONNECTED, etc) |
@@ -223,6 +229,8 @@ extern int kernel_setsockopt(struct socket *sock, int level, int optname, | |||
223 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, | 229 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, |
224 | size_t size, int flags); | 230 | size_t size, int flags); |
225 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); | 231 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); |
232 | extern int kernel_sock_shutdown(struct socket *sock, | ||
233 | enum sock_shutdown_cmd how); | ||
226 | 234 | ||
227 | #ifndef CONFIG_SMP | 235 | #ifndef CONFIG_SMP |
228 | #define SOCKOPS_WRAPPED(name) name | 236 | #define SOCKOPS_WRAPPED(name) name |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 5bf618241ab9..4e81836191df 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -491,9 +491,11 @@ struct nduseroptmsg | |||
491 | unsigned char nduseropt_family; | 491 | unsigned char nduseropt_family; |
492 | unsigned char nduseropt_pad1; | 492 | unsigned char nduseropt_pad1; |
493 | unsigned short nduseropt_opts_len; /* Total length of options */ | 493 | unsigned short nduseropt_opts_len; /* Total length of options */ |
494 | int nduseropt_ifindex; | ||
494 | __u8 nduseropt_icmp_type; | 495 | __u8 nduseropt_icmp_type; |
495 | __u8 nduseropt_icmp_code; | 496 | __u8 nduseropt_icmp_code; |
496 | unsigned short nduseropt_pad2; | 497 | unsigned short nduseropt_pad2; |
498 | unsigned int nduseropt_pad3; | ||
497 | /* Followed by one or more ND options */ | 499 | /* Followed by one or more ND options */ |
498 | }; | 500 | }; |
499 | 501 | ||
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 227adcbdfec8..38d5a1e9980d 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
@@ -13,9 +13,6 @@ struct sock; | |||
13 | struct sockaddr; | 13 | struct sockaddr; |
14 | struct socket; | 14 | struct socket; |
15 | 15 | ||
16 | extern void inet_remove_sock(struct sock *sk1); | ||
17 | extern void inet_put_sock(unsigned short num, | ||
18 | struct sock *sk); | ||
19 | extern int inet_release(struct socket *sock); | 16 | extern int inet_release(struct socket *sock); |
20 | extern int inet_stream_connect(struct socket *sock, | 17 | extern int inet_stream_connect(struct socket *sock, |
21 | struct sockaddr * uaddr, | 18 | struct sockaddr * uaddr, |
@@ -30,7 +27,6 @@ extern int inet_sendmsg(struct kiocb *iocb, | |||
30 | struct msghdr *msg, | 27 | struct msghdr *msg, |
31 | size_t size); | 28 | size_t size); |
32 | extern int inet_shutdown(struct socket *sock, int how); | 29 | extern int inet_shutdown(struct socket *sock, int how); |
33 | extern unsigned int inet_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait); | ||
34 | extern int inet_listen(struct socket *sock, int backlog); | 30 | extern int inet_listen(struct socket *sock, int backlog); |
35 | 31 | ||
36 | extern void inet_sock_destruct(struct sock *sk); | 32 | extern void inet_sock_destruct(struct sock *sk); |
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index aa10a8178e70..ad8404b56113 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -22,7 +22,7 @@ struct inet_peer | |||
22 | __be32 v4daddr; /* peer's address */ | 22 | __be32 v4daddr; /* peer's address */ |
23 | __u16 avl_height; | 23 | __u16 avl_height; |
24 | __u16 ip_id_count; /* IP ID for the next packet */ | 24 | __u16 ip_id_count; /* IP ID for the next packet */ |
25 | struct inet_peer *unused_next, **unused_prevp; | 25 | struct list_head unused; |
26 | __u32 dtime; /* the time of last use of not | 26 | __u32 dtime; /* the time of last use of not |
27 | * referenced entries */ | 27 | * referenced entries */ |
28 | atomic_t refcnt; | 28 | atomic_t refcnt; |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 1fd449a6530b..5dd6d90b37eb 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -119,9 +119,11 @@ static inline struct net *maybe_get_net(struct net *net) | |||
119 | #ifdef CONFIG_NET_NS | 119 | #ifdef CONFIG_NET_NS |
120 | #define __net_init | 120 | #define __net_init |
121 | #define __net_exit | 121 | #define __net_exit |
122 | #define __net_initdata | ||
122 | #else | 123 | #else |
123 | #define __net_init __init | 124 | #define __net_init __init |
124 | #define __net_exit __exit_refok | 125 | #define __net_exit __exit_refok |
126 | #define __net_initdata __initdata | ||
125 | #endif | 127 | #endif |
126 | 128 | ||
127 | struct pernet_operations { | 129 | struct pernet_operations { |
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index b8733364557f..c1f797673571 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -103,6 +103,7 @@ typedef enum { | |||
103 | SCTP_CMD_ASSOC_CHANGE, /* generate and send assoc_change event */ | 103 | SCTP_CMD_ASSOC_CHANGE, /* generate and send assoc_change event */ |
104 | SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ | 104 | SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ |
105 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ | 105 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ |
106 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ | ||
106 | SCTP_CMD_LAST | 107 | SCTP_CMD_LAST |
107 | } sctp_verb_t; | 108 | } sctp_verb_t; |
108 | 109 | ||
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index da8354e8e33c..f30b537d6952 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -186,6 +186,8 @@ typedef enum { | |||
186 | SCTP_IERROR_AUTH_BAD_HMAC, | 186 | SCTP_IERROR_AUTH_BAD_HMAC, |
187 | SCTP_IERROR_AUTH_BAD_KEYID, | 187 | SCTP_IERROR_AUTH_BAD_KEYID, |
188 | SCTP_IERROR_PROTO_VIOLATION, | 188 | SCTP_IERROR_PROTO_VIOLATION, |
189 | SCTP_IERROR_ERROR, | ||
190 | SCTP_IERROR_ABORT, | ||
189 | } sctp_ierror_t; | 191 | } sctp_ierror_t; |
190 | 192 | ||
191 | 193 | ||
@@ -407,6 +409,7 @@ typedef enum { | |||
407 | SCTP_RTXR_T3_RTX, | 409 | SCTP_RTXR_T3_RTX, |
408 | SCTP_RTXR_FAST_RTX, | 410 | SCTP_RTXR_FAST_RTX, |
409 | SCTP_RTXR_PMTUD, | 411 | SCTP_RTXR_PMTUD, |
412 | SCTP_RTXR_T1_RTX, | ||
410 | } sctp_retransmit_reason_t; | 413 | } sctp_retransmit_reason_t; |
411 | 414 | ||
412 | /* Reasons to lower cwnd. */ | 415 | /* Reasons to lower cwnd. */ |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 93eb708609e7..34318a33a94c 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | 66 | ||
67 | #ifdef TEST_FRAME | 67 | #ifdef TEST_FRAME |
68 | #undef CONFIG_PROC_FS | ||
69 | #undef CONFIG_SCTP_DBG_OBJCNT | 68 | #undef CONFIG_SCTP_DBG_OBJCNT |
70 | #undef CONFIG_SYSCTL | 69 | #undef CONFIG_SYSCTL |
71 | #endif /* TEST_FRAME */ | 70 | #endif /* TEST_FRAME */ |
@@ -267,6 +266,7 @@ enum | |||
267 | SCTP_MIB_T5_SHUTDOWN_GUARD_EXPIREDS, | 266 | SCTP_MIB_T5_SHUTDOWN_GUARD_EXPIREDS, |
268 | SCTP_MIB_DELAY_SACK_EXPIREDS, | 267 | SCTP_MIB_DELAY_SACK_EXPIREDS, |
269 | SCTP_MIB_AUTOCLOSE_EXPIREDS, | 268 | SCTP_MIB_AUTOCLOSE_EXPIREDS, |
269 | SCTP_MIB_T1_RETRANSMITS, | ||
270 | SCTP_MIB_T3_RETRANSMITS, | 270 | SCTP_MIB_T3_RETRANSMITS, |
271 | SCTP_MIB_PMTUD_RETRANSMITS, | 271 | SCTP_MIB_PMTUD_RETRANSMITS, |
272 | SCTP_MIB_FAST_RETRANSMITS, | 272 | SCTP_MIB_FAST_RETRANSMITS, |
@@ -664,6 +664,9 @@ static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag) | |||
664 | return (h & (sctp_assoc_hashsize-1)); | 664 | return (h & (sctp_assoc_hashsize-1)); |
665 | } | 665 | } |
666 | 666 | ||
667 | #define sctp_for_each_hentry(epb, node, head) \ | ||
668 | hlist_for_each_entry(epb, node, head, node) | ||
669 | |||
667 | /* Is a socket of this style? */ | 670 | /* Is a socket of this style? */ |
668 | #define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) | 671 | #define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) |
669 | static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) | 672 | static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ef892e00c833..eb3113c38a94 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -100,20 +100,19 @@ struct crypto_hash; | |||
100 | struct sctp_bind_bucket { | 100 | struct sctp_bind_bucket { |
101 | unsigned short port; | 101 | unsigned short port; |
102 | unsigned short fastreuse; | 102 | unsigned short fastreuse; |
103 | struct sctp_bind_bucket *next; | 103 | struct hlist_node node; |
104 | struct sctp_bind_bucket **pprev; | ||
105 | struct hlist_head owner; | 104 | struct hlist_head owner; |
106 | }; | 105 | }; |
107 | 106 | ||
108 | struct sctp_bind_hashbucket { | 107 | struct sctp_bind_hashbucket { |
109 | spinlock_t lock; | 108 | spinlock_t lock; |
110 | struct sctp_bind_bucket *chain; | 109 | struct hlist_head chain; |
111 | }; | 110 | }; |
112 | 111 | ||
113 | /* Used for hashing all associations. */ | 112 | /* Used for hashing all associations. */ |
114 | struct sctp_hashbucket { | 113 | struct sctp_hashbucket { |
115 | rwlock_t lock; | 114 | rwlock_t lock; |
116 | struct sctp_ep_common *chain; | 115 | struct hlist_head chain; |
117 | } __attribute__((__aligned__(8))); | 116 | } __attribute__((__aligned__(8))); |
118 | 117 | ||
119 | 118 | ||
@@ -212,6 +211,7 @@ extern struct sctp_globals { | |||
212 | 211 | ||
213 | /* Flag to indicate if addip is enabled. */ | 212 | /* Flag to indicate if addip is enabled. */ |
214 | int addip_enable; | 213 | int addip_enable; |
214 | int addip_noauth_enable; | ||
215 | 215 | ||
216 | /* Flag to indicate if PR-SCTP is enabled. */ | 216 | /* Flag to indicate if PR-SCTP is enabled. */ |
217 | int prsctp_enable; | 217 | int prsctp_enable; |
@@ -249,6 +249,7 @@ extern struct sctp_globals { | |||
249 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 249 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
250 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | 250 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) |
251 | #define sctp_addip_enable (sctp_globals.addip_enable) | 251 | #define sctp_addip_enable (sctp_globals.addip_enable) |
252 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) | ||
252 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 253 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
253 | #define sctp_auth_enable (sctp_globals.auth_enable) | 254 | #define sctp_auth_enable (sctp_globals.auth_enable) |
254 | 255 | ||
@@ -873,10 +874,11 @@ struct sctp_transport { | |||
873 | * address list derived from the INIT or INIT ACK chunk, a | 874 | * address list derived from the INIT or INIT ACK chunk, a |
874 | * number of data elements needs to be maintained including: | 875 | * number of data elements needs to be maintained including: |
875 | */ | 876 | */ |
876 | __u32 rtt; /* This is the most recent RTT. */ | ||
877 | |||
878 | /* RTO : The current retransmission timeout value. */ | 877 | /* RTO : The current retransmission timeout value. */ |
879 | unsigned long rto; | 878 | unsigned long rto; |
879 | unsigned long last_rto; | ||
880 | |||
881 | __u32 rtt; /* This is the most recent RTT. */ | ||
880 | 882 | ||
881 | /* RTTVAR : The current RTT variation. */ | 883 | /* RTTVAR : The current RTT variation. */ |
882 | __u32 rttvar; | 884 | __u32 rttvar; |
@@ -1184,9 +1186,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
1184 | int flags); | 1186 | int flags); |
1185 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1187 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1186 | __u8 use_as_src, gfp_t gfp); | 1188 | __u8 use_as_src, gfp_t gfp); |
1187 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1189 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); |
1188 | void fastcall (*rcu_call)(struct rcu_head *, | ||
1189 | void (*func)(struct rcu_head *))); | ||
1190 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1190 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1191 | struct sctp_sock *); | 1191 | struct sctp_sock *); |
1192 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | 1192 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, |
@@ -1229,8 +1229,7 @@ typedef enum { | |||
1229 | 1229 | ||
1230 | struct sctp_ep_common { | 1230 | struct sctp_ep_common { |
1231 | /* Fields to help us manage our entries in the hash tables. */ | 1231 | /* Fields to help us manage our entries in the hash tables. */ |
1232 | struct sctp_ep_common *next; | 1232 | struct hlist_node node; |
1233 | struct sctp_ep_common **pprev; | ||
1234 | int hashent; | 1233 | int hashent; |
1235 | 1234 | ||
1236 | /* Runtime type information. What kind of endpoint is this? */ | 1235 | /* Runtime type information. What kind of endpoint is this? */ |
@@ -1541,7 +1540,6 @@ struct sctp_association { | |||
1541 | __u8 asconf_capable; /* Does peer support ADDIP? */ | 1540 | __u8 asconf_capable; /* Does peer support ADDIP? */ |
1542 | __u8 prsctp_capable; /* Can peer do PR-SCTP? */ | 1541 | __u8 prsctp_capable; /* Can peer do PR-SCTP? */ |
1543 | __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ | 1542 | __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ |
1544 | __u8 addip_capable; /* Can peer do ADD-IP */ | ||
1545 | 1543 | ||
1546 | __u32 adaptation_ind; /* Adaptation Code point. */ | 1544 | __u32 adaptation_ind; /* Adaptation Code point. */ |
1547 | 1545 | ||