diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-10 03:03:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:56:18 -0400 |
commit | 6687e988d9aeaccad6774e6a8304f681f3ec0a03 (patch) | |
tree | ecd3d28f9989847aa1dcde4782de0210aeadc290 /include/linux | |
parent | 64ce207306debd7157f47282be94770407bec01c (diff) |
[ICSK]: Move TCP congestion avoidance members to icsk
This changeset basically moves tcp_sk()->{ca_ops,ca_state,etc} to inet_csk(),
minimal renaming/moving done in this changeset to ease review.
Most of it is just changes of struct tcp_sock * to struct sock * parameters.
With this we move to a state closer to two interesting goals:
1. Generalisation of net/ipv4/tcp_diag.c, becoming inet_diag.c, being used
for any INET transport protocol that has struct inet_hashinfo and are
derived from struct inet_connection_sock. Keeps the userspace API, that will
just not display DCCP sockets, while newer versions of tools can support
DCCP.
2. INET generic transport pluggable Congestion Avoidance infrastructure, using
the current TCP CA infrastructure with DCCP.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/tcp.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 620096840744..ac4ca44c75ca 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -258,19 +258,15 @@ struct tcp_sock { | |||
258 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ | 258 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ |
259 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ | 259 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ |
260 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ | 260 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ |
261 | __u8 ca_state; /* State of fast-retransmit machine */ | ||
262 | 261 | ||
263 | __u8 keepalive_probes; /* num of allowed keep alive probes */ | ||
264 | __u16 advmss; /* Advertised MSS */ | ||
265 | __u32 window_clamp; /* Maximal window to advertise */ | 262 | __u32 window_clamp; /* Maximal window to advertise */ |
266 | __u32 rcv_ssthresh; /* Current window clamp */ | 263 | __u32 rcv_ssthresh; /* Current window clamp */ |
267 | 264 | ||
268 | __u32 frto_highmark; /* snd_nxt when RTO occurred */ | 265 | __u32 frto_highmark; /* snd_nxt when RTO occurred */ |
269 | __u8 reordering; /* Packet reordering metric. */ | 266 | __u8 reordering; /* Packet reordering metric. */ |
270 | __u8 frto_counter; /* Number of new acks after RTO */ | 267 | __u8 frto_counter; /* Number of new acks after RTO */ |
271 | |||
272 | __u8 nonagle; /* Disable Nagle algorithm? */ | 268 | __u8 nonagle; /* Disable Nagle algorithm? */ |
273 | /* ONE BYTE HOLE, TRY TO PACK */ | 269 | __u8 keepalive_probes; /* num of allowed keep alive probes */ |
274 | 270 | ||
275 | /* RTT measurement */ | 271 | /* RTT measurement */ |
276 | __u32 srtt; /* smoothed round trip time << 3 */ | 272 | __u32 srtt; /* smoothed round trip time << 3 */ |
@@ -311,8 +307,7 @@ struct tcp_sock { | |||
311 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 307 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
312 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ | 308 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ |
313 | 309 | ||
314 | __u8 probes_out; /* unanswered 0 window probes */ | 310 | __u16 advmss; /* Advertised MSS */ |
315 | __u8 ecn_flags; /* ECN status bits. */ | ||
316 | __u16 prior_ssthresh; /* ssthresh saved at recovery start */ | 311 | __u16 prior_ssthresh; /* ssthresh saved at recovery start */ |
317 | __u32 lost_out; /* Lost packets */ | 312 | __u32 lost_out; /* Lost packets */ |
318 | __u32 sacked_out; /* SACK'd packets */ | 313 | __u32 sacked_out; /* SACK'd packets */ |
@@ -327,7 +322,7 @@ struct tcp_sock { | |||
327 | __u32 urg_seq; /* Seq of received urgent pointer */ | 322 | __u32 urg_seq; /* Seq of received urgent pointer */ |
328 | __u16 urg_data; /* Saved octet of OOB data and control flags */ | 323 | __u16 urg_data; /* Saved octet of OOB data and control flags */ |
329 | __u8 urg_mode; /* In urgent mode */ | 324 | __u8 urg_mode; /* In urgent mode */ |
330 | /* ONE BYTE HOLE, TRY TO PACK! */ | 325 | __u8 ecn_flags; /* ECN status bits. */ |
331 | __u32 snd_up; /* Urgent pointer */ | 326 | __u32 snd_up; /* Urgent pointer */ |
332 | 327 | ||
333 | __u32 total_retrans; /* Total retransmits for entire connection */ | 328 | __u32 total_retrans; /* Total retransmits for entire connection */ |
@@ -351,11 +346,6 @@ struct tcp_sock { | |||
351 | __u32 seq; | 346 | __u32 seq; |
352 | __u32 time; | 347 | __u32 time; |
353 | } rcvq_space; | 348 | } rcvq_space; |
354 | |||
355 | /* Pluggable TCP congestion control hook */ | ||
356 | struct tcp_congestion_ops *ca_ops; | ||
357 | u32 ca_priv[16]; | ||
358 | #define TCP_CA_PRIV_SIZE (16*sizeof(u32)) | ||
359 | }; | 349 | }; |
360 | 350 | ||
361 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 351 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
@@ -377,11 +367,6 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) | |||
377 | return (struct tcp_timewait_sock *)sk; | 367 | return (struct tcp_timewait_sock *)sk; |
378 | } | 368 | } |
379 | 369 | ||
380 | static inline void *tcp_ca(const struct tcp_sock *tp) | ||
381 | { | ||
382 | return (void *) tp->ca_priv; | ||
383 | } | ||
384 | |||
385 | #endif | 370 | #endif |
386 | 371 | ||
387 | #endif /* _LINUX_TCP_H */ | 372 | #endif /* _LINUX_TCP_H */ |