net/failsafe: free port by dedicated function
authorMatan Azrad <matan@mellanox.com>
Mon, 22 Jan 2018 16:38:21 +0000 (16:38 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 19:49:06 +0000 (20:49 +0100)
Call dedicated ethdev API to free port in remove time as was done in
other fail-safe places.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_ether.c

index 0f1630e..643f3d6 100644 (file)
@@ -298,7 +298,7 @@ fs_dev_remove(struct sub_device *sdev)
                        ERROR("Bus detach failed for sub_device %u",
                              SUB_ID(sdev));
                } else {
-                       ETH(sdev)->state = RTE_ETH_DEV_UNUSED;
+                       rte_eth_dev_release_port(ETH(sdev));
                }
                sdev->state = DEV_PARSED;
                /* fallthrough */