[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4abb5ce6-394e-47dd-ad02-ed75a8aa42e1@redhat.com>
Date: Thu, 9 Jan 2025 11:59:25 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Leo Yang <leo.yang.sy0@...il.com>, jk@...econstruct.com.au,
matt@...econstruct.com.au, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, horms@...nel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Leo Yang <Leo-Yang@...ntatw.com>
Subject: Re: [PATCH net v2] mctp i3c: fix MCTP I3C driver multi-thread issue
On 1/7/25 4:15 AM, Leo Yang wrote:
> 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.
>
> According to the MCTP spec, a multiple-packet message must be composed
> in sequence, and if there is a wrong sequence, the whole message will be
> discarded and wait for the next SOM.
> For example, SOM → Pkt Seq #2 → Pkt Seq #1 → Pkt Seq #3 → EOM.
>
> Therefore, we try to solve this problem by adding a mutex to the
> mctp_i3c_read function. Before the modification, when a command
> requesting a multiple-packet message response is sent consecutively, an
> error usually occurs within 100 loops. After the mutex, it can go
> through 40000 loops without any error, and it seems to run well.
>
> But I'm a little worried about the performance of mutex in high load
> situation (as spec seems to allow different endpoints to respond at the
> same time), do you think this is a feasible solution?
For the record, I'm taking the liberty of dropping the above paragraph
from the changelog, as the question IMHO should have been placed after
the --- separator, has been already replied and repost just for this
change would consume more time from everyone.
Cheers,
Paolo
Powered by blists - more mailing lists