net/mlx5: fix Tx doorbell write memory barrier
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Fri, 15 Nov 2019 11:35:06 +0000 (11:35 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:06 +0000 (17:36 +0100)
commitf078ceb6ae9395f48285850edad41ebc21532de6
treed45457ceea44ffd12cd651ce58820ca17fdd988d
parentcd4569d2bf3c4405f2e06ca88e926fa788bad948
net/mlx5: fix Tx doorbell write memory barrier

As the result of testing it was found that some hosts have
the performance penalty imposed by required write memory barrier
after doorbell writing. Before 19.08 release there was some
heuristics to decide whether write memory barrier should be
performed. For the bursts of recommended size (or multiple)
it was supposed there were some extra ongoing packets in the
next burst and write memory barrier may be skipped (supposed
to be performed in the next burst, at least after descriptor
writing).

This patch restores that behaviour, the devargs tx_db_nc=2
must be specified to engage this performance tuning feature.

Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
doc/guides/nics/mlx5.rst
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_defs.h
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_rxtx.c
drivers/net/mlx5/mlx5_rxtx.h
drivers/net/mlx5/mlx5_txq.c