net/failsafe: fix removal scope

The fail-safe PMD uses a per sub-device flag called "remove" to
indicate the scope where the sub-device was removed physically and
whether its software resources should be released.

This flag is set when the fail-safe receives an RMV notification
about the physical removal of the sub-device, and should be unset when
all the sub-device resources are released.

The previous code wrongly unsets the flag in dev_configure(), instead
of when the software resources release is completed.

Change the remove flag unsetting to take action in the end of the
software resources release.

Fixes: a46f8d5 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
This commit is contained in:
Matan Azrad 2018-02-12 20:51:41 +00:00 committed by Thomas Monjalon
parent 64f1a631d0
commit 82bae1ea01
2 changed files with 1 additions and 1 deletions

View File

@ -280,6 +280,7 @@ fs_dev_remove(struct sub_device *sdev)
/* the end */
break;
}
sdev->remove = 0;
failsafe_hotplug_alarm_install(sdev->fs_dev);
}

View File

@ -131,7 +131,6 @@ fs_dev_configure(struct rte_eth_dev *dev)
dev->data->dev_conf.intr_conf.lsc = 0;
}
DEBUG("Configuring sub-device %d", i);
sdev->remove = 0;
ret = rte_eth_dev_configure(PORT_ID(sdev),
dev->data->nb_rx_queues,
dev->data->nb_tx_queues,