tcp_queue_rcv用于将接收到的skb加入到接收队列receive_queue中,首先会调用tcp_try_coalesce进行分段合并到队列中最后一个skb的尝试,若失败则调用__skb_queue_tail添加该skb到队列尾部; 1staticint__must_check tcp_queue_rcv(structsock *sk,structsk_buff *skb,inthdrlen,2bool*fragstolen)3{4inteaten;56/*...
TCP输入 tcp_queue_rcv staticint__must_check tcp_queue_rcv(structsock *sk,structsk_buff *skb,inthdrlen,bool*fragstolen) {inteaten;/*取队尾*/structsk_buff *tail = skb_peek_tail(&sk->sk_receive_queue); __skb_pull(skb, hdrlen);/*尝试进行分段合并*/eaten= (tail &&tcp_try_coalesce(...