[dpdk-dev] [PATCH 2/2] net/mlx5: add free for eth dev port in case of error
Raslan Darawsheh
rasland at mellanox.com
Mon May 7 14:18:54 CEST 2018
in case of errors need to free the eth_dev port that was allocated
during the port setup.
Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
---
drivers/net/mlx5/mlx5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d34076b..63c94ad 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1064,6 +1064,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
claim_zero(mlx5_glue->dealloc_pd(pd));
if (ctx)
claim_zero(mlx5_glue->close_device(ctx));
+ if (eth_dev)
+ rte_eth_dev_release_port(eth_dev);
break;
}
/*
--
2.7.4
More information about the dev
mailing list