diff options
author | 2017-02-06 15:28:36 +0200 | |
---|---|---|
committer | 2017-02-13 12:32:25 +0200 | |
commit | 669374787cd8b6381d695306cd6dd9020e16fc90 (patch) | |
tree | a8e721869f9080e5e6bfd8b7b5b9581992541f9f /src/dpdk/drivers/net/mlx5/mlx5.c | |
parent | 8957b86380f433fb1b91338ac3dd535d11ccfe7c (diff) |
Our patches to mlx5 in dpdk1702
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src/dpdk/drivers/net/mlx5/mlx5.c')
-rw-r--r-- | src/dpdk/drivers/net/mlx5/mlx5.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/dpdk/drivers/net/mlx5/mlx5.c b/src/dpdk/drivers/net/mlx5/mlx5.c index d4bd4696..34100a66 100644 --- a/src/dpdk/drivers/net/mlx5/mlx5.c +++ b/src/dpdk/drivers/net/mlx5/mlx5.c @@ -181,6 +181,9 @@ mlx5_dev_close(struct rte_eth_dev *dev) } if (priv->reta_idx != NULL) rte_free(priv->reta_idx); + + mlx5_stats_free(dev); + priv_unlock(priv); memset(priv, 0, sizeof(*priv)); } @@ -372,6 +375,15 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) int idx; int i; + /* TREX PATCH, lazy ibv_init */ + 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); /* Get mlx5_dev[] index. */ @@ -533,6 +545,12 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) priv->mps = mps; /* Enable MPW by default if supported. */ priv->cqe_comp = 1; /* Enable compression by default. */ err = mlx5_args(priv, pci_dev->device.devargs); + + /* TREX PATCH */ + /* set for maximum performance default */ + priv->txq_inline =64; + priv->txqs_inline =4; + if (err) { ERROR("failed to process device arguments: %s", strerror(err)); @@ -787,7 +805,6 @@ rte_mlx5_pmd_init(void) * 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); } |