net/mlx5: do not select legacy MPW implicitly
authorAlexander Kozyrev <akozyrev@mellanox.com>
Thu, 11 Jun 2020 17:42:00 +0000 (17:42 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:07 +0000 (19:21 +0200)
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 <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_rxtx.c

index 22cdf15..4d67925 100644 (file)
@@ -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;