Re: [PATCH 32/56] net/sfc: implement driver operation to init device on attach
From: Andrew Rybchenko <hidden>
Date: 2016-11-24 14:58:22
On 11/23/2016 06:26 PM, Ferruh Yigit wrote:
On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:quoted
The setup and configuration of the PMD is not performance sensitive, but is not thread safe either. It is possible that the multiple read/writes during PMD setup and configuration could be corrupted in a multi-thread environment.Right, this is not thread-safe, but this is valid for all PMDs, it is not expected to have initialization in multi-threaded environment, that said so, synchronization also won't hurt, as you said this is not fast path, just may not be necessary.
In fact further patches really need the lock and it should be introduced and maintained from the very beginning. I'll add comments in v2 to explain it.
quoted
Since this is not performance sensitive, the developer can choose to add their own layer to provide thread-safe setup and configuration. It is expected that, in most applications, the initial configuration of the network ports would be done by a single thread at startup. Reviewed-by: Andy Moreton <redacted> Signed-off-by: Andrew Rybchenko <redacted><...>
Thanks, Andrew.