diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-29 03:16:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-29 03:16:22 -0500 |
commit | 5656b6ca19c602a7074effae360e5a4dcfdc8170 (patch) | |
tree | 13eb8138999a3c6a8e6f92fb98b0cc54b7240c6a /include/net | |
parent | c1ac403bfa240617da2bce861ea5c3a907a65612 (diff) | |
parent | 4814326b59db0cfd18ac652626d955ad3f57fb0f (diff) |
Merge branch 'net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sctp/constants.h | 4 | ||||
-rw-r--r-- | include/net/sctp/sm.h | 3 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 16 | ||||
-rw-r--r-- | include/net/sctp/user.h | 134 |
4 files changed, 60 insertions, 97 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 58f714a3b670..63908840eef0 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -308,6 +308,10 @@ enum { SCTP_MAX_GABS = 16 }; | |||
308 | 308 | ||
309 | #define SCTP_DEFAULT_MINWINDOW 1500 /* default minimum rwnd size */ | 309 | #define SCTP_DEFAULT_MINWINDOW 1500 /* default minimum rwnd size */ |
310 | #define SCTP_DEFAULT_MAXWINDOW 65535 /* default rwnd size */ | 310 | #define SCTP_DEFAULT_MAXWINDOW 65535 /* default rwnd size */ |
311 | #define SCTP_DEFAULT_RWND_SHIFT 4 /* by default, update on 1/16 of | ||
312 | * rcvbuf, which is 1/8 of initial | ||
313 | * window | ||
314 | */ | ||
311 | #define SCTP_DEFAULT_MAXSEGMENT 1500 /* MTU size, this is the limit | 315 | #define SCTP_DEFAULT_MAXSEGMENT 1500 /* MTU size, this is the limit |
312 | * to which we will raise the P-MTU. | 316 | * to which we will raise the P-MTU. |
313 | */ | 317 | */ |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index c1dd89365833..851c813adb3a 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -243,7 +243,8 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *, | |||
243 | const struct sctp_chunk *chunk, | 243 | const struct sctp_chunk *chunk, |
244 | __be16 cause_code, | 244 | __be16 cause_code, |
245 | const void *payload, | 245 | const void *payload, |
246 | size_t paylen); | 246 | size_t paylen, |
247 | size_t reserve_tail); | ||
247 | 248 | ||
248 | struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, | 249 | struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, |
249 | union sctp_addr *, | 250 | union sctp_addr *, |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cd2e18778f81..bc3f8d879c5c 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -231,6 +231,11 @@ extern struct sctp_globals { | |||
231 | /* Flag to indicate whether computing and verifying checksum | 231 | /* Flag to indicate whether computing and verifying checksum |
232 | * is disabled. */ | 232 | * is disabled. */ |
233 | int checksum_disable; | 233 | int checksum_disable; |
234 | |||
235 | /* Threshold for rwnd update SACKS. Receive buffer shifted this many | ||
236 | * bits is an indicator of when to send and window update SACK. | ||
237 | */ | ||
238 | int rwnd_update_shift; | ||
234 | } sctp_globals; | 239 | } sctp_globals; |
235 | 240 | ||
236 | #define sctp_rto_initial (sctp_globals.rto_initial) | 241 | #define sctp_rto_initial (sctp_globals.rto_initial) |
@@ -267,6 +272,7 @@ extern struct sctp_globals { | |||
267 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 272 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
268 | #define sctp_auth_enable (sctp_globals.auth_enable) | 273 | #define sctp_auth_enable (sctp_globals.auth_enable) |
269 | #define sctp_checksum_disable (sctp_globals.checksum_disable) | 274 | #define sctp_checksum_disable (sctp_globals.checksum_disable) |
275 | #define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift) | ||
270 | 276 | ||
271 | /* SCTP Socket type: UDP or TCP style. */ | 277 | /* SCTP Socket type: UDP or TCP style. */ |
272 | typedef enum { | 278 | typedef enum { |
@@ -936,6 +942,8 @@ struct sctp_transport { | |||
936 | /* Data that has been sent, but not acknowledged. */ | 942 | /* Data that has been sent, but not acknowledged. */ |
937 | __u32 flight_size; | 943 | __u32 flight_size; |
938 | 944 | ||
945 | __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ | ||
946 | |||
939 | /* TSN marking the fast recovery exit point */ | 947 | /* TSN marking the fast recovery exit point */ |
940 | __u32 fast_recovery_exit; | 948 | __u32 fast_recovery_exit; |
941 | 949 | ||
@@ -944,12 +952,6 @@ struct sctp_transport { | |||
944 | /* Source address. */ | 952 | /* Source address. */ |
945 | union sctp_addr saddr; | 953 | union sctp_addr saddr; |
946 | 954 | ||
947 | /* When was the last time(in jiffies) that a data packet was sent on | ||
948 | * this transport? This is used to adjust the cwnd when the transport | ||
949 | * becomes inactive. | ||
950 | */ | ||
951 | unsigned long last_time_used; | ||
952 | |||
953 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | 955 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to |
954 | * the destination address every heartbeat interval. | 956 | * the destination address every heartbeat interval. |
955 | */ | 957 | */ |
@@ -1070,6 +1072,8 @@ void sctp_transport_put(struct sctp_transport *); | |||
1070 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1072 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
1071 | void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); | 1073 | void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); |
1072 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); | 1074 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); |
1075 | void sctp_transport_burst_limited(struct sctp_transport *); | ||
1076 | void sctp_transport_burst_reset(struct sctp_transport *); | ||
1073 | unsigned long sctp_transport_timeout(struct sctp_transport *); | 1077 | unsigned long sctp_transport_timeout(struct sctp_transport *); |
1074 | void sctp_transport_reset(struct sctp_transport *); | 1078 | void sctp_transport_reset(struct sctp_transport *); |
1075 | void sctp_transport_update_pmtu(struct sctp_transport *, u32); | 1079 | void sctp_transport_update_pmtu(struct sctp_transport *, u32); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index be2334aaf52e..2b2769c5ca9f 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -60,96 +60,49 @@ typedef __s32 sctp_assoc_t; | |||
60 | /* The following symbols come from the Sockets API Extensions for | 60 | /* The following symbols come from the Sockets API Extensions for |
61 | * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>. | 61 | * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>. |
62 | */ | 62 | */ |
63 | enum sctp_optname { | 63 | #define SCTP_RTOINFO 0 |
64 | SCTP_RTOINFO, | 64 | #define SCTP_ASSOCINFO 1 |
65 | #define SCTP_RTOINFO SCTP_RTOINFO | 65 | #define SCTP_INITMSG 2 |
66 | SCTP_ASSOCINFO, | 66 | #define SCTP_NODELAY 3 /* Get/set nodelay option. */ |
67 | #define SCTP_ASSOCINFO SCTP_ASSOCINFO | 67 | #define SCTP_AUTOCLOSE 4 |
68 | SCTP_INITMSG, | 68 | #define SCTP_SET_PEER_PRIMARY_ADDR 5 |
69 | #define SCTP_INITMSG SCTP_INITMSG | 69 | #define SCTP_PRIMARY_ADDR 6 |
70 | SCTP_NODELAY, /* Get/set nodelay option. */ | 70 | #define SCTP_ADAPTATION_LAYER 7 |
71 | #define SCTP_NODELAY SCTP_NODELAY | 71 | #define SCTP_DISABLE_FRAGMENTS 8 |
72 | SCTP_AUTOCLOSE, | 72 | #define SCTP_PEER_ADDR_PARAMS 9 |
73 | #define SCTP_AUTOCLOSE SCTP_AUTOCLOSE | 73 | #define SCTP_DEFAULT_SEND_PARAM 10 |
74 | SCTP_SET_PEER_PRIMARY_ADDR, | 74 | #define SCTP_EVENTS 11 |
75 | #define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR | 75 | #define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */ |
76 | SCTP_PRIMARY_ADDR, | 76 | #define SCTP_MAXSEG 13 /* Get/set maximum fragment. */ |
77 | #define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR | 77 | #define SCTP_STATUS 14 |
78 | SCTP_ADAPTATION_LAYER, | 78 | #define SCTP_GET_PEER_ADDR_INFO 15 |
79 | #define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER | 79 | #define SCTP_DELAYED_ACK_TIME 16 |
80 | SCTP_DISABLE_FRAGMENTS, | 80 | #define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME |
81 | #define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS | 81 | #define SCTP_CONTEXT 17 |
82 | SCTP_PEER_ADDR_PARAMS, | 82 | #define SCTP_FRAGMENT_INTERLEAVE 18 |
83 | #define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS | 83 | #define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */ |
84 | SCTP_DEFAULT_SEND_PARAM, | 84 | #define SCTP_MAX_BURST 20 /* Set/Get max burst */ |
85 | #define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM | 85 | #define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */ |
86 | SCTP_EVENTS, | 86 | #define SCTP_HMAC_IDENT 22 |
87 | #define SCTP_EVENTS SCTP_EVENTS | 87 | #define SCTP_AUTH_KEY 23 |
88 | SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */ | 88 | #define SCTP_AUTH_ACTIVE_KEY 24 |
89 | #define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR | 89 | #define SCTP_AUTH_DELETE_KEY 25 |
90 | SCTP_MAXSEG, /* Get/set maximum fragment. */ | 90 | #define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */ |
91 | #define SCTP_MAXSEG SCTP_MAXSEG | 91 | #define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */ |
92 | SCTP_STATUS, | 92 | #define SCTP_GET_ASSOC_NUMBER 28 /* Read only */ |
93 | #define SCTP_STATUS SCTP_STATUS | 93 | |
94 | SCTP_GET_PEER_ADDR_INFO, | 94 | /* Internal Socket Options. Some of the sctp library functions are |
95 | #define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO | 95 | * implemented using these socket options. |
96 | SCTP_DELAYED_ACK, | 96 | */ |
97 | #define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK | 97 | #define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */ |
98 | #define SCTP_DELAYED_ACK SCTP_DELAYED_ACK | 98 | #define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */ |
99 | SCTP_CONTEXT, /* Receive Context */ | 99 | #define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */ |
100 | #define SCTP_CONTEXT SCTP_CONTEXT | 100 | /* Options 104-106 are deprecated and removed. Do not use this space */ |
101 | SCTP_FRAGMENT_INTERLEAVE, | 101 | #define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */ |
102 | #define SCTP_FRAGMENT_INTERLEAVE SCTP_FRAGMENT_INTERLEAVE | 102 | #define SCTP_GET_PEER_ADDRS 108 /* Get all peer addresss. */ |
103 | SCTP_PARTIAL_DELIVERY_POINT, /* Set/Get partial delivery point */ | 103 | #define SCTP_GET_LOCAL_ADDRS 109 /* Get all local addresss. */ |
104 | #define SCTP_PARTIAL_DELIVERY_POINT SCTP_PARTIAL_DELIVERY_POINT | 104 | #define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */ |
105 | SCTP_MAX_BURST, /* Set/Get max burst */ | 105 | #define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */ |
106 | #define SCTP_MAX_BURST SCTP_MAX_BURST | ||
107 | SCTP_AUTH_CHUNK, /* Set only: add a chunk type to authenticat */ | ||
108 | #define SCTP_AUTH_CHUNK SCTP_AUTH_CHUNK | ||
109 | SCTP_HMAC_IDENT, | ||
110 | #define SCTP_HMAC_IDENT SCTP_HMAC_IDENT | ||
111 | SCTP_AUTH_KEY, | ||
112 | #define SCTP_AUTH_KEY SCTP_AUTH_KEY | ||
113 | SCTP_AUTH_ACTIVE_KEY, | ||
114 | #define SCTP_AUTH_ACTIVE_KEY SCTP_AUTH_ACTIVE_KEY | ||
115 | SCTP_AUTH_DELETE_KEY, | ||
116 | #define SCTP_AUTH_DELETE_KEY SCTP_AUTH_DELETE_KEY | ||
117 | SCTP_PEER_AUTH_CHUNKS, /* Read only */ | ||
118 | #define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS | ||
119 | SCTP_LOCAL_AUTH_CHUNKS, /* Read only */ | ||
120 | #define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS | ||
121 | SCTP_GET_ASSOC_NUMBER, /* Read only */ | ||
122 | #define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER | ||
123 | |||
124 | |||
125 | /* Internal Socket Options. Some of the sctp library functions are | ||
126 | * implemented using these socket options. | ||
127 | */ | ||
128 | SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */ | ||
129 | #define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD | ||
130 | SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */ | ||
131 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM | ||
132 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ | ||
133 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF | ||
134 | SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */ | ||
135 | #define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD | ||
136 | SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */ | ||
137 | #define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD | ||
138 | SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */ | ||
139 | #define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD | ||
140 | SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ | ||
141 | #define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD | ||
142 | SCTP_SOCKOPT_CONNECTX_OLD, /* CONNECTX old requests. */ | ||
143 | #define SCTP_SOCKOPT_CONNECTX_OLD SCTP_SOCKOPT_CONNECTX_OLD | ||
144 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ | ||
145 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS | ||
146 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ | ||
147 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS | ||
148 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
149 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
150 | SCTP_SOCKOPT_CONNECTX3, /* CONNECTX requests. (new implementation) */ | ||
151 | #define SCTP_SOCKOPT_CONNECTX3 SCTP_SOCKOPT_CONNECTX3 | ||
152 | }; | ||
153 | 106 | ||
154 | /* | 107 | /* |
155 | * 5.2.1 SCTP Initiation Structure (SCTP_INIT) | 108 | * 5.2.1 SCTP Initiation Structure (SCTP_INIT) |
@@ -206,6 +159,7 @@ enum sctp_sinfo_flags { | |||
206 | SCTP_UNORDERED = 1, /* Send/receive message unordered. */ | 159 | SCTP_UNORDERED = 1, /* Send/receive message unordered. */ |
207 | SCTP_ADDR_OVER = 2, /* Override the primary destination. */ | 160 | SCTP_ADDR_OVER = 2, /* Override the primary destination. */ |
208 | SCTP_ABORT=4, /* Send an ABORT message to the peer. */ | 161 | SCTP_ABORT=4, /* Send an ABORT message to the peer. */ |
162 | SCTP_SACK_IMMEDIATELY = 8, /* SACK should be sent without delay */ | ||
209 | SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */ | 163 | SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */ |
210 | }; | 164 | }; |
211 | 165 | ||