aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h56
1 files changed, 31 insertions, 25 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index b31b6b74aa28..2e2557388e36 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -224,6 +224,12 @@ struct tcp_options_received {
224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ 224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
225}; 225};
226 226
227/* This is the max number of SACKS that we'll generate and process. It's safe
228 * to increse this, although since:
229 * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
230 * only four options will fit in a standard TCP header */
231#define TCP_NUM_SACKS 4
232
227struct tcp_request_sock { 233struct tcp_request_sock {
228 struct inet_request_sock req; 234 struct inet_request_sock req;
229#ifdef CONFIG_TCP_MD5SIG 235#ifdef CONFIG_TCP_MD5SIG
@@ -291,10 +297,9 @@ struct tcp_sock {
291 u32 rcv_ssthresh; /* Current window clamp */ 297 u32 rcv_ssthresh; /* Current window clamp */
292 298
293 u32 frto_highmark; /* snd_nxt when RTO occurred */ 299 u32 frto_highmark; /* snd_nxt when RTO occurred */
294 u8 reordering; /* Packet reordering metric. */ 300 u16 advmss; /* Advertised MSS */
295 u8 frto_counter; /* Number of new acks after RTO */ 301 u8 frto_counter; /* Number of new acks after RTO */
296 u8 nonagle; /* Disable Nagle algorithm? */ 302 u8 nonagle; /* Disable Nagle algorithm? */
297 u8 keepalive_probes; /* num of allowed keep alive probes */
298 303
299/* RTT measurement */ 304/* RTT measurement */
300 u32 srtt; /* smoothed round trip time << 3 */ 305 u32 srtt; /* smoothed round trip time << 3 */
@@ -305,6 +310,10 @@ struct tcp_sock {
305 310
306 u32 packets_out; /* Packets which are "in flight" */ 311 u32 packets_out; /* Packets which are "in flight" */
307 u32 retrans_out; /* Retransmitted packets out */ 312 u32 retrans_out; /* Retransmitted packets out */
313
314 u16 urg_data; /* Saved octet of OOB data and control flags */
315 u8 urg_mode; /* In urgent mode */
316 u8 ecn_flags; /* ECN status bits. */
308/* 317/*
309 * Options received (usually on last packet, some only on SYN packets). 318 * Options received (usually on last packet, some only on SYN packets).
310 */ 319 */
@@ -320,13 +329,24 @@ struct tcp_sock {
320 u32 snd_cwnd_used; 329 u32 snd_cwnd_used;
321 u32 snd_cwnd_stamp; 330 u32 snd_cwnd_stamp;
322 331
323 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
324
325 u32 rcv_wnd; /* Current receiver window */ 332 u32 rcv_wnd; /* Current receiver window */
326 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ 333 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
327 u32 pushed_seq; /* Last pushed seq, required to talk to windows */ 334 u32 pushed_seq; /* Last pushed seq, required to talk to windows */
335 u32 lost_out; /* Lost packets */
336 u32 sacked_out; /* SACK'd packets */
337 u32 fackets_out; /* FACK'd packets */
338 u32 tso_deferred;
339 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
328 340
329/* SACKs data */ 341 /* from STCP, retrans queue hinting */
342 struct sk_buff* lost_skb_hint;
343 struct sk_buff *scoreboard_skb_hint;
344 struct sk_buff *retransmit_skb_hint;
345 struct sk_buff *forward_skb_hint;
346
347 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
348
349 /* SACKs data, these 2 need to be together (see tcp_build_and_update_options) */
330 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ 350 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
331 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ 351 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
332 352
@@ -337,23 +357,14 @@ struct tcp_sock {
337 * sacked_out > 0) 357 * sacked_out > 0)
338 */ 358 */
339 359
340 /* from STCP, retrans queue hinting */
341 struct sk_buff* lost_skb_hint;
342
343 struct sk_buff *scoreboard_skb_hint;
344 struct sk_buff *retransmit_skb_hint;
345 struct sk_buff *forward_skb_hint;
346
347 int lost_cnt_hint; 360 int lost_cnt_hint;
348 int retransmit_cnt_hint; 361 int retransmit_cnt_hint;
349 362
350 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ 363 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */
351 364
352 u16 advmss; /* Advertised MSS */ 365 u8 reordering; /* Packet reordering metric. */
366 u8 keepalive_probes; /* num of allowed keep alive probes */
353 u32 prior_ssthresh; /* ssthresh saved at recovery start */ 367 u32 prior_ssthresh; /* ssthresh saved at recovery start */
354 u32 lost_out; /* Lost packets */
355 u32 sacked_out; /* SACK'd packets */
356 u32 fackets_out; /* FACK'd packets */
357 u32 high_seq; /* snd_nxt at onset of congestion */ 368 u32 high_seq; /* snd_nxt at onset of congestion */
358 369
359 u32 retrans_stamp; /* Timestamp of the last retransmit, 370 u32 retrans_stamp; /* Timestamp of the last retransmit,
@@ -361,23 +372,16 @@ struct tcp_sock {
361 * the first SYN. */ 372 * the first SYN. */
362 u32 undo_marker; /* tracking retrans started here. */ 373 u32 undo_marker; /* tracking retrans started here. */
363 int undo_retrans; /* number of undoable retransmissions. */ 374 int undo_retrans; /* number of undoable retransmissions. */
375 u32 total_retrans; /* Total retransmits for entire connection */
376
364 u32 urg_seq; /* Seq of received urgent pointer */ 377 u32 urg_seq; /* Seq of received urgent pointer */
365 u16 urg_data; /* Saved octet of OOB data and control flags */
366 u8 urg_mode; /* In urgent mode */
367 u8 ecn_flags; /* ECN status bits. */
368 u32 snd_up; /* Urgent pointer */ 378 u32 snd_up; /* Urgent pointer */
369 379
370 u32 total_retrans; /* Total retransmits for entire connection */
371 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
372
373 unsigned int keepalive_time; /* time before keep alive takes place */ 380 unsigned int keepalive_time; /* time before keep alive takes place */
374 unsigned int keepalive_intvl; /* time interval between keep alive probes */ 381 unsigned int keepalive_intvl; /* time interval between keep alive probes */
375 int linger2;
376 382
377 unsigned long last_synq_overflow; 383 unsigned long last_synq_overflow;
378 384
379 u32 tso_deferred;
380
381/* Receiver side RTT estimation */ 385/* Receiver side RTT estimation */
382 struct { 386 struct {
383 u32 rtt; 387 u32 rtt;
@@ -405,6 +409,8 @@ struct tcp_sock {
405/* TCP MD5 Signagure Option information */ 409/* TCP MD5 Signagure Option information */
406 struct tcp_md5sig_info *md5sig_info; 410 struct tcp_md5sig_info *md5sig_info;
407#endif 411#endif
412
413 int linger2;
408}; 414};
409 415
410static inline struct tcp_sock *tcp_sk(const struct sock *sk) 416static inline struct tcp_sock *tcp_sk(const struct sock *sk)