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.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 5f359dbfcdce..eb125a4c30b3 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -243,6 +243,16 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
243 return (tcp_hdr(skb)->doff - 5) * 4; 243 return (tcp_hdr(skb)->doff - 5) * 4;
244} 244}
245 245
246/* TCP Fast Open */
247#define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */
248#define TCP_FASTOPEN_COOKIE_MAX 16 /* Max Fast Open Cookie size in bytes */
249
250/* TCP Fast Open Cookie as stored in memory */
251struct tcp_fastopen_cookie {
252 s8 len;
253 u8 val[TCP_FASTOPEN_COOKIE_MAX];
254};
255
246/* This defines a selective acknowledgement block. */ 256/* This defines a selective acknowledgement block. */
247struct tcp_sack_block_wire { 257struct tcp_sack_block_wire {
248 __be32 start_seq; 258 __be32 start_seq;
@@ -339,6 +349,9 @@ struct tcp_sock {
339 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ 349 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
340 u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ 350 u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
341 351
352 struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
353 unsigned long tsq_flags;
354
342 /* Data for direct copy to user */ 355 /* Data for direct copy to user */
343 struct { 356 struct {
344 struct sk_buff_head prequeue; 357 struct sk_buff_head prequeue;
@@ -373,7 +386,9 @@ struct tcp_sock {
373 unused : 1; 386 unused : 1;
374 u8 repair_queue; 387 u8 repair_queue;
375 u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ 388 u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */
376 early_retrans_delayed:1; /* Delayed ER timer installed */ 389 early_retrans_delayed:1, /* Delayed ER timer installed */
390 syn_data:1, /* SYN includes data */
391 syn_fastopen:1; /* SYN includes Fast Open option */
377 392
378/* RTT measurement */ 393/* RTT measurement */
379 u32 srtt; /* smoothed round trip time << 3 */ 394 u32 srtt; /* smoothed round trip time << 3 */
@@ -478,6 +493,9 @@ struct tcp_sock {
478 u32 probe_seq_start; 493 u32 probe_seq_start;
479 u32 probe_seq_end; 494 u32 probe_seq_end;
480 } mtu_probe; 495 } mtu_probe;
496 u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
497 * while socket was owned by user.
498 */
481 499
482#ifdef CONFIG_TCP_MD5SIG 500#ifdef CONFIG_TCP_MD5SIG
483/* TCP AF-Specific parts; only used by MD5 Signature support so far */ 501/* TCP AF-Specific parts; only used by MD5 Signature support so far */
@@ -487,6 +505,9 @@ struct tcp_sock {
487 struct tcp_md5sig_info __rcu *md5sig_info; 505 struct tcp_md5sig_info __rcu *md5sig_info;
488#endif 506#endif
489 507
508/* TCP fastopen related information */
509 struct tcp_fastopen_request *fastopen_req;
510
490 /* When the cookie options are generated and exchanged, then this 511 /* When the cookie options are generated and exchanged, then this
491 * object holds a reference to them (cookie_values->kref). Also 512 * object holds a reference to them (cookie_values->kref). Also
492 * contains related tcp_cookie_transactions fields. 513 * contains related tcp_cookie_transactions fields.
@@ -494,6 +515,17 @@ struct tcp_sock {
494 struct tcp_cookie_values *cookie_values; 515 struct tcp_cookie_values *cookie_values;
495}; 516};
496 517
518enum tsq_flags {
519 TSQ_THROTTLED,
520 TSQ_QUEUED,
521 TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */
522 TCP_WRITE_TIMER_DEFERRED, /* tcp_write_timer() found socket was owned */
523 TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */
524 TCP_MTU_REDUCED_DEFERRED, /* tcp_v{4|6}_err() could not call
525 * tcp_v{4|6}_mtu_reduced()
526 */
527};
528
497static inline struct tcp_sock *tcp_sk(const struct sock *sk) 529static inline struct tcp_sock *tcp_sk(const struct sock *sk)
498{ 530{
499 return (struct tcp_sock *)sk; 531 return (struct tcp_sock *)sk;
@@ -507,7 +539,7 @@ struct tcp_timewait_sock {
507 u32 tw_ts_recent; 539 u32 tw_ts_recent;
508 long tw_ts_recent_stamp; 540 long tw_ts_recent_stamp;
509#ifdef CONFIG_TCP_MD5SIG 541#ifdef CONFIG_TCP_MD5SIG
510 struct tcp_md5sig_key *tw_md5_key; 542 struct tcp_md5sig_key *tw_md5_key;
511#endif 543#endif
512 /* Few sockets in timewait have cookies; in that case, then this 544 /* Few sockets in timewait have cookies; in that case, then this
513 * object holds a reference to them (tw_cookie_values->kref). 545 * object holds a reference to them (tw_cookie_values->kref).