diff options
author | 2016-11-14 15:39:53 +0200 | |
---|---|---|
committer | 2016-11-14 15:56:03 +0200 | |
commit | 38030f50b4cc97ed9433203f49516e8ea8b135c4 (patch) | |
tree | 11d4508ddf76eeadc409c495715e98120fc74dac /src/dpdk/drivers/net | |
parent | 947806622a178bf06a2daba927aa478162689ef2 (diff) |
move ibv_fork_init due to a crash of debug image see trex-270
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src/dpdk/drivers/net')
-rw-r--r-- | src/dpdk/drivers/net/mlx5/mlx5.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dpdk/drivers/net/mlx5/mlx5.c b/src/dpdk/drivers/net/mlx5/mlx5.c index 34a3a3c0..303b917b 100644 --- a/src/dpdk/drivers/net/mlx5/mlx5.c +++ b/src/dpdk/drivers/net/mlx5/mlx5.c @@ -369,6 +369,13 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) unsigned int mps; int idx; int i; + static int ibv_was_init=0; + + if (ibv_was_init==0) { + ibv_fork_init(); + ibv_was_init=1; + } + (void)pci_drv; assert(pci_drv == &mlx5_driver.pci_drv); @@ -763,7 +770,6 @@ rte_mlx5_pmd_init(const char *name, const char *args) * using this PMD, which is not supported in forked processes. */ setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); - ibv_fork_init(); rte_eal_pci_register(&mlx5_driver.pci_drv); return 0; } |