net/mlx5: fix parameters defaults

With the Enhanced multi packet send addition, the defaults were made
in order to get the maximum out of the box performance.
Features like tso, don't use the enhanced send, however the defaults
are still valid. This cause Tx queue creation to fail.

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Fixes: 6ce84bd88919 ("net/mlx5: add enhanced multi-packet send for ConnectX-5")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
This commit is contained in:
Shahaf Shuler 2017-04-18 13:22:28 +03:00 committed by Ferruh Yigit
parent 50b244a179
commit 2dfbbd925d

View File

@ -611,13 +611,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
priv->pd = pd;
priv->mtu = ETHER_MTU;
priv->mps = mps; /* Enable MPW by default if supported. */
/* Set default values for Enhanced MPW, a.k.a MPWv2. */
if (mps == MLX5_MPW_ENHANCED) {
priv->mpw_hdr_dseg = 0;
priv->txqs_inline = MLX5_EMPW_MIN_TXQS;
priv->inline_max_packet_sz = MLX5_EMPW_MAX_INLINE_LEN;
priv->txq_inline = MLX5_WQE_SIZE_MAX - MLX5_WQE_SIZE;
}
priv->cqe_comp = 1; /* Enable compression by default. */
priv->tunnel_en = tunnel_en;
err = mlx5_args(&args, pci_dev->device.devargs);
@ -689,6 +682,17 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
INFO("%sMPS is %s",
priv->mps == MLX5_MPW_ENHANCED ? "Enhanced " : "",
priv->mps != MLX5_MPW_DISABLED ? "enabled" : "disabled");
/* Set default values for Enhanced MPW, a.k.a MPWv2. */
if (priv->mps == MLX5_MPW_ENHANCED) {
if (args.txqs_inline == MLX5_ARG_UNSET)
priv->txqs_inline = MLX5_EMPW_MIN_TXQS;
if (args.inline_max_packet_sz == MLX5_ARG_UNSET)
priv->inline_max_packet_sz =
MLX5_EMPW_MAX_INLINE_LEN;
if (args.txq_inline == MLX5_ARG_UNSET)
priv->txq_inline = MLX5_WQE_SIZE_MAX -
MLX5_WQE_SIZE;
}
/* Allocate and register default RSS hash keys. */
priv->rss_conf = rte_calloc(__func__, hash_rxq_init_n,
sizeof((*priv->rss_conf)[0]), 0);