net/mlx5: reduce Tx completion index memory loads
authorAlexander Kozyrev <akozyrev@mellanox.com>
Mon, 16 Mar 2020 15:34:59 +0000 (15:34 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 18 Mar 2020 14:29:40 +0000 (15:29 +0100)
commit8d4659e70fc081ab220e44552af194900d720d2e
tree9d1fc15045a468058cb73a7fed1636d3603d53cf
parent1908cab425e4206321fb3f62688f9e1f92b36f6a
net/mlx5: reduce Tx completion index memory loads

There is a non-optimal check if doorbell is needed present in the
mlx5_tx_handle_completion() function. Advancing a copy of the txq
consumer index and checking this copy with initial value causes
unnecessary memory loads and hurts the performance. It is better to
have a simple small boolean variable for this purpose. That allows
to eliminate all the excessive memory operations with the txq consumer
index and restore the performance of the tx completions.

Fixes: 1fd9af05e44e ("net/mlx5: update Tx error handling routine")
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