From: Alexander Kozyrev Date: Thu, 11 Jun 2020 17:42:00 +0000 (+0000) Subject: net/mlx5: do not select legacy MPW implicitly X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a23d96ae59e21f7b0ada43d2757a726fc565005a;p=dpdk.git net/mlx5: do not select legacy MPW implicitly The Legacy MPW (multi-packet write) should not be engaged implicitly. We should exclude this function from a Tx burst routine selection process unless it is requested specifically by setting the txq_mpw_en devarg. Exclude this function from the selection process the same way it is done for the Enhanced MPW in the mlx5_select_tx_function() routine. Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 22cdf15180..4d67925e5f 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -5542,6 +5542,9 @@ mlx5_select_tx_function(struct rte_eth_dev *dev) /* Does not meet requested offloads at all. */ continue; } + if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_MPW) + /* Do not enable legacy MPW if not configured. */ + continue; if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_EMPW) /* Do not enable eMPW if not configured. */ continue;