[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0e373986f3dad8e79266b09b225d126af8ae981.camel@codeconstruct.com.au>
Date: Fri, 03 Jan 2025 10:28:17 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: Leo Yang <leo.yang.sy0@...il.com>, matt@...econstruct.com.au,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Leo Yang <Leo-Yang@...ntatw.com>
Subject: Re: [PATCH net] mctp i3c: fix MCTP I3C driver multi-thread issue
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
Powered by blists - more mailing lists