diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 10:01:50 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 10:01:50 -0700 | 
| commit | 3c4cfadef6a1665d9cd02a543782d03d3e6740c6 (patch) | |
| tree | 3df72faaacd494d5ac8c9668df4f529b1b5e4457 /include/linux/tcp.h | |
| parent | e017507f37d5cb8b541df165a824958bc333bec3 (diff) | |
| parent | 320f5ea0cedc08ef65d67e056bcb9d181386ef2c (diff) | |
| download | olio-linux-3.10-3c4cfadef6a1665d9cd02a543782d03d3e6740c6.tar.xz olio-linux-3.10-3c4cfadef6a1665d9cd02a543782d03d3e6740c6.zip  | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David S Miller:
 1) Remove the ipv4 routing cache.  Now lookups go directly into the FIB
    trie and use prebuilt routes cached there.
    No more garbage collection, no more rDOS attacks on the routing
    cache.  Instead we now get predictable and consistent performance,
    no matter what the pattern of traffic we service.
    This has been almost 2 years in the making.  Special thanks to
    Julian Anastasov, Eric Dumazet, Steffen Klassert, and others who
    have helped along the way.
    I'm sure that with a change of this magnitude there will be some
    kind of fallout, but such things ought the be simple to fix at this
    point.  Luckily I'm not European so I'll be around all of August to
    fix things :-)
    The major stages of this work here are each fronted by a forced
    merge commit whose commit message contains a top-level description
    of the motivations and implementation issues.
 2) Pre-demux of established ipv4 TCP sockets, saves a route demux on
    input.
 3) TCP SYN/ACK performance tweaks from Eric Dumazet.
 4) Add namespace support for netfilter L4 conntrack helpers, from Gao
    Feng.
 5) Add config mechanism for Energy Efficient Ethernet to ethtool, from
    Yuval Mintz.
 6) Remove quadratic behavior from /proc/net/unix, from Eric Dumazet.
 7) Support for connection tracker helpers in userspace, from Pablo
    Neira Ayuso.
 8) Allow userspace driven TX load balancing functions in TEAM driver,
    from Jiri Pirko.
 9) Kill off NLMSG_PUT and RTA_PUT macros, more gross stuff with
    embedded gotos.
10) TCP Small Queues, essentially minimize the amount of TCP data queued
    up in the packet scheduler layer.  Whereas the existing BQL (Byte
    Queue Limits) limits the pkt_sched --> netdevice queuing levels,
    this controls the TCP --> pkt_sched queueing levels.
    From Eric Dumazet.
11) Reduce the number of get_page/put_page ops done on SKB fragments,
    from Alexander Duyck.
12) Implement protection against blind resets in TCP (RFC 5961), from
    Eric Dumazet.
13) Support the client side of TCP Fast Open, basically the ability to
    send data in the SYN exchange, from Yuchung Cheng.
    Basically, the sender queues up data with a sendmsg() call using
    MSG_FASTOPEN, then they do the connect() which emits the queued up
    fastopen data.
14) Avoid all the problems we get into in TCP when timers or PMTU events
    hit a locked socket.  The TCP Small Queues changes added a
    tcp_release_cb() that allows us to queue work up to the
    release_sock() caller, and that's what we use here too.  From Eric
    Dumazet.
15) Zero copy on TX support for TUN driver, from Michael S. Tsirkin.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1870 commits)
  genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEP
  r8169: revert "add byte queue limit support".
  ipv4: Change rt->rt_iif encoding.
  net: Make skb->skb_iif always track skb->dev
  ipv4: Prepare for change of rt->rt_iif encoding.
  ipv4: Remove all RTCF_DIRECTSRC handliing.
  ipv4: Really ignore ICMP address requests/replies.
  decnet: Don't set RTCF_DIRECTSRC.
  net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse.
  ipv4: Remove redundant assignment
  rds: set correct msg_namelen
  openvswitch: potential NULL deref in sample()
  tcp: dont drop MTU reduction indications
  bnx2x: Add new 57840 device IDs
  tcp: avoid oops in tcp_metrics and reset tcpm_stamp
  niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value
  niu: Fix to check for dma mapping errors.
  net: Fix references to out-of-scope variables in put_cmsg_compat()
  net: ethernet: davinci_emac: add pm_runtime support
  net: ethernet: davinci_emac: Remove unnecessary #include
  ...
Diffstat (limited to 'include/linux/tcp.h')
| -rw-r--r-- | include/linux/tcp.h | 36 | 
1 files changed, 34 insertions, 2 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 5f359dbfcdc..eb125a4c30b 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)  	return (tcp_hdr(skb)->doff - 5) * 4;  } +/* TCP Fast Open */ +#define TCP_FASTOPEN_COOKIE_MIN	4	/* Min Fast Open Cookie size in bytes */ +#define TCP_FASTOPEN_COOKIE_MAX	16	/* Max Fast Open Cookie size in bytes */ + +/* TCP Fast Open Cookie as stored in memory */ +struct tcp_fastopen_cookie { +	s8	len; +	u8	val[TCP_FASTOPEN_COOKIE_MAX]; +}; +  /* This defines a selective acknowledgement block. */  struct tcp_sack_block_wire {  	__be32	start_seq; @@ -339,6 +349,9 @@ struct tcp_sock {  	u32	rcv_tstamp;	/* timestamp of last received ACK (for keepalives) */  	u32	lsndtime;	/* timestamp of last sent data packet (for restart window) */ +	struct list_head tsq_node; /* anchor in tsq_tasklet.head list */ +	unsigned long	tsq_flags; +  	/* Data for direct copy to user */  	struct {  		struct sk_buff_head	prequeue; @@ -373,7 +386,9 @@ struct tcp_sock {  		unused      : 1;  	u8	repair_queue;  	u8	do_early_retrans:1,/* Enable RFC5827 early-retransmit  */ -		early_retrans_delayed:1; /* Delayed ER timer installed */ +		early_retrans_delayed:1, /* Delayed ER timer installed */ +		syn_data:1,	/* SYN includes data */ +		syn_fastopen:1;	/* SYN includes Fast Open option */  /* RTT measurement */  	u32	srtt;		/* smoothed round trip time << 3	*/ @@ -478,6 +493,9 @@ struct tcp_sock {  		u32		  probe_seq_start;  		u32		  probe_seq_end;  	} mtu_probe; +	u32	mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG +			   * while socket was owned by user. +			   */  #ifdef CONFIG_TCP_MD5SIG  /* TCP AF-Specific parts; only used by MD5 Signature support so far */ @@ -487,6 +505,9 @@ struct tcp_sock {  	struct tcp_md5sig_info	__rcu *md5sig_info;  #endif +/* TCP fastopen related information */ +	struct tcp_fastopen_request *fastopen_req; +  	/* When the cookie options are generated and exchanged, then this  	 * object holds a reference to them (cookie_values->kref).  Also  	 * contains related tcp_cookie_transactions fields. @@ -494,6 +515,17 @@ struct tcp_sock {  	struct tcp_cookie_values  *cookie_values;  }; +enum tsq_flags { +	TSQ_THROTTLED, +	TSQ_QUEUED, +	TCP_TSQ_DEFERRED,	   /* tcp_tasklet_func() found socket was owned */ +	TCP_WRITE_TIMER_DEFERRED,  /* tcp_write_timer() found socket was owned */ +	TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */ +	TCP_MTU_REDUCED_DEFERRED,  /* tcp_v{4|6}_err() could not call +				    * tcp_v{4|6}_mtu_reduced() +				    */ +}; +  static inline struct tcp_sock *tcp_sk(const struct sock *sk)  {  	return (struct tcp_sock *)sk; @@ -507,7 +539,7 @@ struct tcp_timewait_sock {  	u32			  tw_ts_recent;  	long			  tw_ts_recent_stamp;  #ifdef CONFIG_TCP_MD5SIG -	struct tcp_md5sig_key	*tw_md5_key; +	struct tcp_md5sig_key	  *tw_md5_key;  #endif  	/* Few sockets in timewait have cookies; in that case, then this  	 * object holds a reference to them (tw_cookie_values->kref).  |