inet: add rsk_listener field to struct request_sock

Once we'll be able to lookup request sockets in ehash table,
we'll need to get access to listener which created this request.

This avoid doing a lookup to find the listener, which benefits
for a more solid SO_REUSEPORT, and is needed once we no
longer queue request sock into a listener private queue.

Note that 'struct tcp_request_sock'->listener could be reduced
to a single bit, as TFO listener should match req->rsk_listener.
TFO will no longer need to hold a reference on the listener.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2015-03-17 18:32:28 -07:00
committed by David S. Miller
parent e49bb337d7
commit 4e9a578e5b
2 changed files with 10 additions and 4 deletions

View File

@@ -5970,7 +5970,7 @@ static void tcp_openreq_init(struct request_sock *req,
struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
struct sock *sk_listener)
{
struct request_sock *req = reqsk_alloc(ops);
struct request_sock *req = reqsk_alloc(ops, sk_listener);
if (req) {
struct inet_request_sock *ireq = inet_rsk(req);