All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next-next 2/3] mptcp: move the whole rx path under msk socket lock protection
Date: Mon, 2 Dec 2024 17:56:27 +0100	[thread overview]
Message-ID: <ed1926c2-feaa-4e95-966f-e095ae4c445d@kernel.org> (raw)
In-Reply-To: <19310c3f96743f3298c029ec5a89b4e4f1ed10b9.1732902181.git.pabeni@redhat.com>

Hi Paolo,

On 29/11/2024 18:45, Paolo Abeni wrote:
> After commit c2e6048fa1cf ("mptcp: fix race in release_cb") it's
> pretty straight forward move the whole MPTCP rx path under the socket
> lock leveraging the release_cb.
> 
> We can drop a bunch of spin_lock pairs in the receive functions, use
> a single receive queue and invoke __mptcp_move_skbs only when subflows
> ask for it.
> 
> This will allow more cleanup in the next patch

(...)

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index f768aa4473fb..159add48f6d9 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c

(...)

> @@ -2290,9 +2283,8 @@ static int mptcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
>  		}
>  	}
>  
> -	pr_debug("msk=%p rx queue empty=%d:%d copied=%d\n",
> -		 msk, skb_queue_empty_lockless(&sk->sk_receive_queue),
> -		 skb_queue_empty(&msk->receive_queue), copied);
> +	pr_debug("msk=%p rx queue empty=%d copied=%d",

A small detail: the '\n' at the end is missing: no need to delay the
output if it is not supposed to be used with a pr_cont().

(Something we can fix when applying the patches.)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2024-12-02 16:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 17:45 [PATCH mptcp-next-next 0/3] mptcp: rx path refactor Paolo Abeni
2024-11-29 17:45 ` [PATCH mptcp-next-next 1/3] mptcp: consolidate subflow cleanup Paolo Abeni
2024-11-29 17:45 ` [PATCH mptcp-next-next 2/3] mptcp: move the whole rx path under msk socket lock protection Paolo Abeni
2024-12-02 16:56   ` Matthieu Baerts [this message]
2024-12-03  7:40     ` Paolo Abeni
2024-11-29 17:45 ` [PATCH mptcp-next-next 3/3] mptcp: cleanup mem accounting Paolo Abeni
2024-11-29 18:52 ` [PATCH mptcp-next-next 0/3] mptcp: rx path refactor MPTCP CI
2024-12-02  8:19   ` Paolo Abeni
2024-12-02 16:56 ` Matthieu Baerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed1926c2-feaa-4e95-966f-e095ae4c445d@kernel.org \
    --to=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.