Skip to content

Commit d89e3ed

Browse files
Paolo Abenidavem330
authored andcommitted
mptcp: update misleading comments.
The MPTCP data path is quite complex and hard to understend even without some foggy comments referring to modified code and/or completely misleading from the beginning. Update a few of them to more accurately describing the current status. Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6bf4102 commit d89e3ed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

net/mptcp/protocol.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -662,19 +662,19 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
662662

663663
skb = skb_peek(&ssk->sk_receive_queue);
664664
if (!skb) {
665-
/* if no data is found, a racing workqueue/recvmsg
666-
* already processed the new data, stop here or we
667-
* can enter an infinite loop
665+
/* With racing move_skbs_to_msk() and __mptcp_move_skbs(),
666+
* a different CPU can have already processed the pending
667+
* data, stop here or we can enter an infinite loop
668668
*/
669669
if (!moved)
670670
done = true;
671671
break;
672672
}
673673

674674
if (__mptcp_check_fallback(msk)) {
675-
/* if we are running under the workqueue, TCP could have
676-
* collapsed skbs between dummy map creation and now
677-
* be sure to adjust the size
675+
/* Under fallback skbs have no MPTCP extension and TCP could
676+
* collapse them between the dummy map creation and the
677+
* current dequeue. Be sure to adjust the map size.
678678
*/
679679
map_remaining = skb->len;
680680
subflow->map_data_len = skb->len;
@@ -3768,7 +3768,7 @@ static __poll_t mptcp_poll(struct file *file, struct socket *sock,
37683768
if (sk->sk_shutdown & RCV_SHUTDOWN)
37693769
mask |= EPOLLIN | EPOLLRDNORM | EPOLLRDHUP;
37703770

3771-
/* This barrier is coupled with smp_wmb() in tcp_reset() */
3771+
/* This barrier is coupled with smp_wmb() in __mptcp_error_report() */
37723772
smp_rmb();
37733773
if (sk->sk_err)
37743774
mask |= EPOLLERR;

0 commit comments

Comments
 (0)