Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e49bb337 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

inet: uninline inet_reqsk_alloc()



inet_reqsk_alloc() is becoming fat and should not be inlined.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 407640de
Loading
Loading
Loading
Loading
+2 −22
Original line number Original line Diff line number Diff line
@@ -244,28 +244,8 @@ static inline unsigned int __inet_ehashfn(const __be32 laddr,
			    initval);
			    initval);
}
}


static inline struct request_sock *
struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
inet_reqsk_alloc(const struct request_sock_ops *ops, struct sock *sk_listener)
				      struct sock *sk_listener);
{
	struct request_sock *req = reqsk_alloc(ops);

	if (req) {
		struct inet_request_sock *ireq = inet_rsk(req);

		kmemcheck_annotate_bitfield(ireq, flags);
		ireq->opt = NULL;
		atomic64_set(&ireq->ir_cookie, 0);
		ireq->ireq_state = TCP_NEW_SYN_RECV;
		write_pnet(&ireq->ireq_net, sock_net(sk_listener));

		/* Following is temporary. It is coupled with debugging
		 * helpers in reqsk_put() & reqsk_free()
		 */
		atomic_set(&ireq->ireq_refcnt, 0);
	}

	return req;
}


static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
{
{
+24 −0
Original line number Original line Diff line number Diff line
@@ -5967,6 +5967,30 @@ static void tcp_openreq_init(struct request_sock *req,
	ireq->ir_mark = inet_request_mark(sk, skb);
	ireq->ir_mark = inet_request_mark(sk, skb);
}
}


struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
				      struct sock *sk_listener)
{
	struct request_sock *req = reqsk_alloc(ops);

	if (req) {
		struct inet_request_sock *ireq = inet_rsk(req);

		kmemcheck_annotate_bitfield(ireq, flags);
		ireq->opt = NULL;
		atomic64_set(&ireq->ir_cookie, 0);
		ireq->ireq_state = TCP_NEW_SYN_RECV;
		write_pnet(&ireq->ireq_net, sock_net(sk_listener));

		/* Following is temporary. It is coupled with debugging
		 * helpers in reqsk_put() & reqsk_free()
		 */
		atomic_set(&ireq->ireq_refcnt, 0);
	}

	return req;
}
EXPORT_SYMBOL(inet_reqsk_alloc);

int tcp_conn_request(struct request_sock_ops *rsk_ops,
int tcp_conn_request(struct request_sock_ops *rsk_ops,
		     const struct tcp_request_sock_ops *af_ops,
		     const struct tcp_request_sock_ops *af_ops,
		     struct sock *sk, struct sk_buff *skb)
		     struct sock *sk, struct sk_buff *skb)