net/mlx5: support 32-bit systems
authorMoti Haimovsky <motih@mellanox.com>
Thu, 12 Jul 2018 12:01:31 +0000 (15:01 +0300)
committerShahaf Shuler <shahafs@mellanox.com>
Thu, 12 Jul 2018 12:34:59 +0000 (14:34 +0200)
commit6bf10ab69be027401cc63b99fd30bc91fde525a9
tree9db42b208b94826aa243ea0f2636df0f46373430
parent06b1fe3f6d2121009b3b879e92b8cca25d4c0c42
net/mlx5: support 32-bit systems

This patch adds support for building and running mlx5 PMD on
32bit systems such as i686.

The main issue to tackle was handling the 32bit access to the UAR
as quoted from the mlx5 PRM:
QP and CQ DoorBells require 64-bit writes. For best performance, it
is recommended to execute the QP/CQ DoorBell as a single 64-bit write
operation. For platforms that do not support 64 bit writes, it is
possible to issue the 64 bits DoorBells through two consecutive
writes,
each write 32 bits, as described below:
* The order of writing each of the Dwords is from lower to upper
  addresses.
* No other DoorBell can be rung (or even start ringing) in the midst
 of an on-going write of a DoorBell over a given UAR page.

The last rule implies that in a multi-threaded environment, the access
to a UAR page (which can be accessible by all threads in the process)
must be synchronized (for example, using a semaphore) unless an atomic
write of 64 bits in a single bus operation is guaranteed. Such a
synchronization is not required for when ringing DoorBells on different
UAR pages.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
doc/guides/nics/features/mlx5.ini
doc/guides/nics/mlx5.rst
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_defs.h
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_rxtx.c
drivers/net/mlx5/mlx5_rxtx.h
drivers/net/mlx5/mlx5_txq.c