net/ena/base: make allocation macros thread-safe
authorIgor Chauskin <igorch@amazon.com>
Wed, 8 Apr 2020 08:28:53 +0000 (10:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:06 +0000 (13:57 +0200)
commitb14fcac035fd8514851c9140a4e26d765b61c532
treecea86a67a3e22b6ee62b1ebee0efcce7d4bf705c
parent38364c2687ead97b99402310087c27131a97748c
net/ena/base: make allocation macros thread-safe

Memory allocation region id could possibly be non-unique
due to non-atomic increment, causing allocation failure.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
drivers/net/ena/base/ena_plat_dpdk.h
drivers/net/ena/ena_ethdev.c