From: Mat Martineau <martineau@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net 1/2] mptcp: fix bad RCVPRUNED mib accounting
Date: Thu, 25 Jul 2024 17:39:41 -0700 (PDT) [thread overview]
Message-ID: <c271e123-2f51-3450-eb46-99975e52804f@kernel.org> (raw)
In-Reply-To: <51cd83cb7690d756e9a71797b133bdd9f286de76.1721921695.git.pabeni@redhat.com>
On Thu, 25 Jul 2024, Paolo Abeni wrote:
> Since its introduction, the mentioned MIB accounted for the wrong
> event: wake-up being skipped as not-needed on some edge condition
> instead of incoming skb being dropped after landing in the (subflow)
> receive queue.
>
> Move the increment in the correct location.
>
> Fixes: ce599c516386 ("mptcp: properly account bulk freed memory")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/protocol.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index b3a48d97f009..13777c35496c 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -350,8 +350,10 @@ static bool __mptcp_move_skb(struct mptcp_sock *msk, struct sock *ssk,
> skb_orphan(skb);
>
> /* try to fetch required memory from subflow */
> - if (!mptcp_rmem_schedule(sk, ssk, skb->truesize))
> + if (!mptcp_rmem_schedule(sk, ssk, skb->truesize)) {
> + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RCVPRUNED);
Hi Paolo -
MIB change LGTM:
Reviewed-by: Mat Martineau <martineau@kernel.org>
> goto drop;
> + }
>
> has_rxtstamp = TCP_SKB_CB(skb)->has_rxtstamp;
>
> @@ -844,10 +846,8 @@ void mptcp_data_ready(struct sock *sk, struct sock *ssk)
> sk_rbuf = ssk_rbuf;
>
> /* over limit? can't append more skbs to msk, Also, no need to wake-up*/
> - if (__mptcp_rmem(sk) > sk_rbuf) {
> - MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RCVPRUNED);
> + if (__mptcp_rmem(sk) > sk_rbuf)
> return;
> - }
>
> /* Wake-up the reader only for in-sequence data */
> mptcp_data_lock(sk);
prev parent reply other threads:[~2024-07-26 0:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 15:53 [PATCH mptcp-net 1/2] mptcp: fix bad RCVPRUNED mib accounting Paolo Abeni
2024-07-25 15:53 ` [PATCH mptcp-net 2/2] mptcp: fix duplicate data handling Paolo Abeni
2024-07-26 0:42 ` Mat Martineau
2024-07-26 10:33 ` Matthieu Baerts
2024-07-26 9:23 ` MPTCP CI
2024-07-26 0:39 ` Mat Martineau [this message]
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=c271e123-2f51-3450-eb46-99975e52804f@kernel.org \
--to=martineau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox