Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints

2024-10-15 Thread David Marchand
On Mon, Oct 14, 2024 at 9:33 PM Robin Jarry wrote: > > While invoking telemetry commands (which may happen at any time, out of > control of the application), an application thread may concurrently > add/remove ports. The telemetry callbacks may then access partially > initialized/uninitialised eth

Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints

2024-10-15 Thread Robin Jarry
David Marchand, Oct 15, 2024 at 10:02: On Mon, Oct 14, 2024 at 10:01 PM Stephen Hemminger If this happens often, and the function takes a long time (like doing i/o) it might be worth changing this to reader/writer in future. Yes, this was an option mentionned when we discussed the issue in Mon

Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints

2024-10-15 Thread David Marchand
On Mon, Oct 14, 2024 at 10:01 PM Stephen Hemminger wrote: > > On Mon, 14 Oct 2024 21:32:37 +0200 > Robin Jarry wrote: > > > While invoking telemetry commands (which may happen at any time, out of > > control of the application), an application thread may concurrently > > add/remove ports. The tel

Re: [PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints

2024-10-14 Thread Stephen Hemminger
On Mon, 14 Oct 2024 21:32:37 +0200 Robin Jarry wrote: > While invoking telemetry commands (which may happen at any time, out of > control of the application), an application thread may concurrently > add/remove ports. The telemetry callbacks may then access partially > initialized/uninitialised e

[PATCH dpdk v3 2/2] ethdev: fix potential race in telemetry endpoints

2024-10-14 Thread Robin Jarry
While invoking telemetry commands (which may happen at any time, out of control of the application), an application thread may concurrently add/remove ports. The telemetry callbacks may then access partially initialized/uninitialised ethdev data. Reuse the ethdev lock that protects port allocation