From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Leo Yang <leo.yang.sy0@gmail.com>,
matt@codeconstruct.com.au, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Leo Yang <Leo-Yang@quantatw.com>
Subject: Re: [PATCH net] mctp i3c: fix MCTP I3C driver multi-thread issue
Date: Fri, 03 Jan 2025 10:28:17 +0800 [thread overview]
Message-ID: <b0e373986f3dad8e79266b09b225d126af8ae981.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20241226025319.1724209-1-Leo-Yang@quantatw.com>
Hi Leo,
> We found a timeout problem with the pldm command on our system. The
> reason is that the MCTP-I3C driver has a race condition when receiving
> multiple-packet messages in multi-thread, resulting in a wrong packet
> order problem.
>
> We identified this problem by adding a debug message to the
> mctp_i3c_read function.
Mostly out of curiosity, could you share a little detail about what you
were observing with that read behaviour? Were the IBIs being handed by
different CPUs in that case?
I assume that you were seeing the netif_rx() out of sequence with the
skbs populated from i3c_device_do_priv_xfers(), is that right?
> Therefore, we try to solve this problem by adding a mutex to the
> mctp_i3c_read function.
Just to clarify the intent here, and if I'm correct with the assumption
above, it would be good to a comment on what this lock is serialising.
If you're re-rolling with Jakub's Fixes request, can you add a comment
too? Something like:
/* ensure that we netif_rx() in the same order as the i3c reads */
mutex_lock(&mi->lock);
Otherwise, all looks good. Thanks for the contribution!
Cheers,
Jeremy
next prev parent reply other threads:[~2025-01-03 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-26 2:53 Leo Yang
2025-01-03 2:08 ` Jakub Kicinski
2025-01-03 2:28 ` Jeremy Kerr [this message]
2025-01-07 1:29 ` Leo Yang
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=b0e373986f3dad8e79266b09b225d126af8ae981.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=Leo-Yang@quantatw.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leo.yang.sy0@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®