On Wed, Feb 16, 2022 at 11:02 AM Bruce Richardson <bruce.richard...@intel.com> wrote: > On Wed, Feb 16, 2022 at 10:41:43AM +0100, David Marchand wrote: > > On Wed, Feb 16, 2022 at 10:31 AM Bruce Richardson > > <bruce.richard...@intel.com> wrote: > > > > > I see that we have other telemetry callbacks for stats, link status > > > > > which might already have the issue. > > > > > > > > You mean there is no lock protection? Neither in the API, nor in > > > > telemetry? > > > > > > > For reporting out stats or link status, I'm not sure a lock should ever > > > be needed since both are just read-only operations. Therefore, I don't > > > believe we have a general issue here. > > > > Ok, if you are sure about this for all drivers for stats and link status, > > you can discard my comment. > > > No, I'm not 100% sure about it, but if any driver has issues with multiple > threads reading stats simultaneously I would hope that that should be > resolved at the driver level. Normally, one would expect read-only > operations to be implicitly multi-thread safe, and I also see that the > documentation on e.g. rte_eth_stats_get() makes no reference to needing > locks or not being thread-safe.
I agree, resolving at the driver level is better. -- David Marchand