[dpdk-dev] [PATCH v2 07/11] ethdev: add lock to port allocation check

Andrew Rybchenko arybchenko at solarflare.com
Thu May 10 12:44:12 CEST 2018


On 05/10/2018 01:43 AM, Thomas Monjalon wrote:
> From: Matan Azrad <matan at mellanox.com>
>
> When comparing the port name, there can be a race condition with
> a thread allocating a new port and writing the name at the same time.
> It can lead to match with a partial name by error.
>
> The check of the port is now considered as a critical section
> protected with locks.
>
> This fix will be even more required for multi-process when the
> port availability will rely only on the name, in a following patch.
>
> Fixes: 84934303a17c ("ethdev: synchronize port allocation")
> Cc: stable at dpdk.org
>
> Signed-off-by: Matan Azrad <matan at mellanox.com>
> Acked-by: Thomas Monjalon <thomas at monjalon.net>

Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list