From: Paolo Abeni <pab...@redhat.com>

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: Geliang Tang <geli...@kernel.org>
Tested-by: Geliang Tang <geli...@kernel.org>
Reviewed-by: Matthieu Baerts (NGI0) <matt...@kernel.org>
Signed-off-by: Paolo Abeni <pab...@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matt...@kernel.org>
---
 net/mptcp/protocol.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 
735a209d40725f077de1056de5e1c64ffec77f55..62cdd2bcff9da12783b97fd40813ede85b5c83d9
 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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;
                }
 

-- 
2.51.0


Reply via email to