mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] tcp: Cache inetpeer in timewait socket, and only when necessary.
Since it's guarenteed that we will access the inetpeer if we're trying to do timewait recycling and TCP options were enabled on the connection, just cache the peer in the timewait socket. In the future, inetpeer lookups will be context dependent (per routing realm), and this helps facilitate that as well. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4670fd819e
commit
2397849baa
6 changed files with 22 additions and 40 deletions
|
@ -506,8 +506,9 @@ struct tcp_timewait_sock {
|
|||
u32 tw_rcv_wnd;
|
||||
u32 tw_ts_recent;
|
||||
long tw_ts_recent_stamp;
|
||||
struct inet_peer *tw_peer;
|
||||
#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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue