Commit 9aa59323 authored by Paolo Abeni's avatar Paolo Abeni Committed by Jakub Kicinski
Browse files

mptcp: leverage skb deferral free



Usage of the skb deferral API is straight-forward; with multiple
subflows actives this allow moving part of the received application
load into multiple CPUs.

Also fix a typo in the related comment.

Reviewed-by: default avatarGeliang Tang <geliang@kernel.org>
Tested-by: default avatarGeliang Tang <geliang@kernel.org>
Reviewed-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250927-net-next-mptcp-rcv-path-imp-v1-1-5da266aa9c1a@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f017c1f7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1943,12 +1943,13 @@ static int __mptcp_recvmsg_mskq(struct sock *sk,
		}

		if (!(flags & MSG_PEEK)) {
			/* avoid the indirect call, we know the destructor is sock_wfree */
			/* avoid the indirect call, we know the destructor is sock_rfree */
			skb->destructor = NULL;
			skb->sk = NULL;
			atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
			sk_mem_uncharge(sk, skb->truesize);
			__skb_unlink(skb, &sk->sk_receive_queue);
			__kfree_skb(skb);
			skb_attempt_defer_free(skb);
			msk->bytes_consumed += count;
		}