簡述網絡
"net/ipv4/tcp_timer.c" line 488 of 691 487 488 out:; 489 if (mptcp(tp)) { 490 mptcp_reinject_data(sk, 1); 491 mptcp_set_rto(sk); 492 } 493 }
函數mptcp_reinject_data的實現以下:tcp
"net/mptcp/mptcp_output.c" line 237 of 1667 236 /* Inserts data into the reinject queue */ 237 void mptcp_reinject_data(struct sock *sk, int clone_it) 238 { 239 struct sk_buff *skb_it, *tmp; 240 struct tcp_sock *tp = tcp_sk(sk); 241 struct sock *meta_sk = tp->meta_sk; 242 243 /* It has already been closed - there is really no point in reinjecting */ 244 if (meta_sk->sk_state == TCP_CLOSE) 245 return; 246 247 skb_queue_walk_safe(&sk->sk_write_queue, skb_it, tmp) { 248 struct tcp_skb_cb *tcb = TCP_SKB_CB(skb_it); 249 /* Subflow syn's and fin's are not reinjected. 250 * 251 * As well as empty subflow-fins with a data-fin. 252 * They are reinjected below (without the subflow-fin-flag) 253 */ 254 if (tcb->tcp_flags & TCPHDR_SYN || 255 (tcb->tcp_flags & TCPHDR_FIN && !mptcp_is_data_fin(skb_it)) || 256 (tcb->tcp_flags & TCPHDR_FIN && mptcp_is_data_fin(skb_it) && !skb_it->len)) 257 continue; 258 259 __mptcp_reinject_data(skb_it, meta_sk, sk, clone_it); 260 } 261 262 skb_it = tcp_write_queue_tail(meta_sk); 263 /* If sk has sent the empty data-fin, we have to reinject it too. */ 264 if (skb_it && mptcp_is_data_fin(skb_it) && skb_it->len == 0 && 265 TCP_SKB_CB(skb_it)->path_mask & mptcp_pi_to_flag(tp->mptcp->path_index)) { 266 __mptcp_reinject_data(skb_it, meta_sk, NULL, 1); 267 } 268 269 mptcp_push_pending_frames(meta_sk); 270 271 tp->pf = 1; 272 }