net/sfc: fix adapter lock usage on rule creation

The point is that adapter lock has to be held on
list accesses, as well as when talking to the HW.

Fixes: a9825ccf5b ("net/sfc: support flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Ivan Malov 2019-11-03 13:33:09 +03:00 committed by Ferruh Yigit
parent 8bac78f826
commit 653b285ff1

View File

@ -2315,10 +2315,10 @@ sfc_flow_create(struct rte_eth_dev *dev,
if (rc != 0)
goto fail_bad_value;
TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);
sfc_adapter_lock(sa);
TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);
if (sa->state == SFC_ADAPTER_STARTED) {
rc = sfc_flow_filter_insert(sa, flow);
if (rc != 0) {