From: Long Li <lon...@microsoft.com>

FDs passed from rte_mp_msg are duplicated to the secondary process and
need to be closed.

Fixes: 0203d33a10 ("net/mlx4: support secondary process")
Signed-off-by: Long Li <lon...@microsoft.com>
---
 drivers/net/mlx4/mlx4_txq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 0db2e55bef..bf7e036e19 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -146,6 +146,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
                if (ret)
                        goto error;
        }
+       close(fd);
        return 0;
 error:
        /* Rollback. */
@@ -155,6 +156,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd)
                        continue;
                txq_uar_uninit_secondary(txq);
        } while (i--);
+       close(fd);
        return -rte_errno;
 }
 
-- 
2.17.1

Reply via email to