mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 22:56:47 +07:00
tcp: move tcp_openreq_init() to tcp_input.c
This big helper is called once from tcp_conn_request(), there is no point having it in an include. Compiler will inline it anyway. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
adc17d6a6c
commit
1bfc4438a7
@ -1137,31 +1137,6 @@ static inline int tcp_full_space(const struct sock *sk)
|
||||
return tcp_win_from_space(sk->sk_rcvbuf);
|
||||
}
|
||||
|
||||
static inline void tcp_openreq_init(struct request_sock *req,
|
||||
struct tcp_options_received *rx_opt,
|
||||
struct sk_buff *skb, struct sock *sk)
|
||||
{
|
||||
struct inet_request_sock *ireq = inet_rsk(req);
|
||||
|
||||
req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
|
||||
req->cookie_ts = 0;
|
||||
tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq;
|
||||
tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1;
|
||||
tcp_rsk(req)->snt_synack = tcp_time_stamp;
|
||||
tcp_rsk(req)->last_oow_ack_time = 0;
|
||||
req->mss = rx_opt->mss_clamp;
|
||||
req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0;
|
||||
ireq->tstamp_ok = rx_opt->tstamp_ok;
|
||||
ireq->sack_ok = rx_opt->sack_ok;
|
||||
ireq->snd_wscale = rx_opt->snd_wscale;
|
||||
ireq->wscale_ok = rx_opt->wscale_ok;
|
||||
ireq->acked = 0;
|
||||
ireq->ecn_ok = 0;
|
||||
ireq->ir_rmt_port = tcp_hdr(skb)->source;
|
||||
ireq->ir_num = ntohs(tcp_hdr(skb)->dest);
|
||||
ireq->ir_mark = inet_request_mark(sk, skb);
|
||||
}
|
||||
|
||||
extern void tcp_openreq_init_rwin(struct request_sock *req,
|
||||
struct sock *sk, struct dst_entry *dst);
|
||||
|
||||
|
@ -5912,6 +5912,31 @@ static void tcp_ecn_create_request(struct request_sock *req,
|
||||
inet_rsk(req)->ecn_ok = 1;
|
||||
}
|
||||
|
||||
static void tcp_openreq_init(struct request_sock *req,
|
||||
const struct tcp_options_received *rx_opt,
|
||||
struct sk_buff *skb, const struct sock *sk)
|
||||
{
|
||||
struct inet_request_sock *ireq = inet_rsk(req);
|
||||
|
||||
req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
|
||||
req->cookie_ts = 0;
|
||||
tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq;
|
||||
tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1;
|
||||
tcp_rsk(req)->snt_synack = tcp_time_stamp;
|
||||
tcp_rsk(req)->last_oow_ack_time = 0;
|
||||
req->mss = rx_opt->mss_clamp;
|
||||
req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0;
|
||||
ireq->tstamp_ok = rx_opt->tstamp_ok;
|
||||
ireq->sack_ok = rx_opt->sack_ok;
|
||||
ireq->snd_wscale = rx_opt->snd_wscale;
|
||||
ireq->wscale_ok = rx_opt->wscale_ok;
|
||||
ireq->acked = 0;
|
||||
ireq->ecn_ok = 0;
|
||||
ireq->ir_rmt_port = tcp_hdr(skb)->source;
|
||||
ireq->ir_num = ntohs(tcp_hdr(skb)->dest);
|
||||
ireq->ir_mark = inet_request_mark(sk, skb);
|
||||
}
|
||||
|
||||
int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
||||
const struct tcp_request_sock_ops *af_ops,
|
||||
struct sock *sk, struct sk_buff *skb)
|
||||
|
Loading…
Reference in New Issue
Block a user