[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:
@@ -328,7 +328,6 @@ extern void tcp_shutdown (struct sock *sk, int how);
|
||||
extern int tcp_v4_rcv(struct sk_buff *skb);
|
||||
|
||||
extern struct inet_peer *tcp_v4_get_peer(struct sock *sk);
|
||||
extern void *tcp_v4_tw_get_peer(struct sock *sk);
|
||||
extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
|
||||
extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
||||
size_t size);
|
||||
|
Reference in New Issue
Block a user