mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 03:50:53 +07:00
tcp: remove hdrlen argument from tcp_queue_rcv()
Only one caller needs to pull TCP headers, so lets move __skb_pull() to the caller side. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
16e8c4ca21
commit
e7395f1f4b
@ -4603,13 +4603,12 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
static int __must_check tcp_queue_rcv(struct sock *sk, struct sk_buff *skb, int hdrlen,
|
||||
bool *fragstolen)
|
||||
static int __must_check tcp_queue_rcv(struct sock *sk, struct sk_buff *skb,
|
||||
bool *fragstolen)
|
||||
{
|
||||
int eaten;
|
||||
struct sk_buff *tail = skb_peek_tail(&sk->sk_receive_queue);
|
||||
|
||||
__skb_pull(skb, hdrlen);
|
||||
eaten = (tail &&
|
||||
tcp_try_coalesce(sk, tail,
|
||||
skb, fragstolen)) ? 1 : 0;
|
||||
@ -4660,7 +4659,7 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size)
|
||||
TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + size;
|
||||
TCP_SKB_CB(skb)->ack_seq = tcp_sk(sk)->snd_una - 1;
|
||||
|
||||
if (tcp_queue_rcv(sk, skb, 0, &fragstolen)) {
|
||||
if (tcp_queue_rcv(sk, skb, &fragstolen)) {
|
||||
WARN_ON_ONCE(fragstolen); /* should not happen */
|
||||
__kfree_skb(skb);
|
||||
}
|
||||
@ -4720,7 +4719,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
eaten = tcp_queue_rcv(sk, skb, 0, &fragstolen);
|
||||
eaten = tcp_queue_rcv(sk, skb, &fragstolen);
|
||||
if (skb->len)
|
||||
tcp_event_data_recv(sk, skb);
|
||||
if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
|
||||
@ -5596,8 +5595,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
|
||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPHITS);
|
||||
|
||||
/* Bulk data transfer: receiver */
|
||||
eaten = tcp_queue_rcv(sk, skb, tcp_header_len,
|
||||
&fragstolen);
|
||||
__skb_pull(skb, tcp_header_len);
|
||||
eaten = tcp_queue_rcv(sk, skb, &fragstolen);
|
||||
|
||||
tcp_event_data_recv(sk, skb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user