net/mlx5e: Add support for PCI relaxed ordering
authorAya Levin <ayal@mellanox.com>
Thu, 26 Mar 2020 12:03:19 +0000 (14:03 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Jul 2020 09:37:49 +0000 (02:37 -0700)
commit17347d5430c4e4e1a3c58ffa2732746bd26a9c02
tree2848daaba7888ce20f7fa46faf4fbc5baaa0038e
parent5d0b84769477fd647a491e882d5aea402c5fafa8
net/mlx5e: Add support for PCI relaxed ordering

The concept of Relaxed Ordering in the PCI Express environment allows
switches in the path between the Requester and Completer to reorder some
transactions just received before others that were previously enqueued.

In ETH driver, there is no question of write integrity since each memory
segment is written only once per cycle. In addition, the driver doesn't
access the memory shared with the hardware until the corresponding CQE
arrives indicating all PCI transactions are done.

Running TCP single stream over ConnectX-4 LX, ARM CPU on remote-numa has
300% improvement in the bandwidth.

With relaxed ordering turned off: BW:10 [GB/s]
With relaxed ordering turned on: BW:40 [GB/s]

The driver turns relaxed ordering with respect to the firmware
capabilities and the return value from pcie_relaxed_ordering_enabled().

Signed-off-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_common.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c