[v4,3/5] failsafe: fix double release of port
Checks
Commit Message
When a sub-device is hot-unplugged, rte_eth_dev_release_port is being
called twice. Once indirectly via rte_eth_dev_close and once explicitly.
Changed the code to remove the explicit call since it's not required and
results in mistakenly releasing port 0 (due to zero'ing of memory being
done in rte_eth_dev_release_port).
Fixes: fac0ae546e5f ("net/failsafe: free port by dedicated function")
Cc: Matan Azrad <matan@nvidia.com>
Cc: stable@dpdk.org
Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
---
drivers/net/failsafe/failsafe_ether.c | 2 --
1 file changed, 2 deletions(-)
@@ -301,8 +301,6 @@ fs_dev_remove(struct sub_device *sdev)
if (ret < 0) {
ERROR("Bus detach failed for sub_device %u",
SUB_ID(sdev));
- } else {
- rte_eth_dev_release_port(ETH(sdev));
}
sdev->state = DEV_PARSED;
/* fallthrough */