net/i40e: fix virtual channel conflict
authorYuying Zhang <yuying.zhang@intel.com>
Mon, 19 Oct 2020 02:20:25 +0000 (02:20 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:26 +0000 (23:24 +0100)
commit99e47bbe4c074c879bbe5d2c316754859fa00912
tree2d2bddbaf85885a5fde09a1d87cb6fd60a013b34
parent9cf9c02bf6eedca1b339dfec0ebfebb8ae52e958
net/i40e: fix virtual channel conflict

i40evf_execute_vf_cmd() uses _atomic_set_cmd() to execute virtual
channel commands safely in multi-process mode and multi-thread mode.
However, it returns error when one process or thread is pending. Add
rte_spinlock_trylock() to handle this issue in concurrent scenarios.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.h
drivers/net/i40e/i40e_ethdev_vf.c