[dpdk-dev] [PATCH v3] net/mlx5: add support for 32bit systems

Ferruh Yigit ferruh.yigit at intel.com
Wed Jul 18 10:08:48 CEST 2018


On 7/13/2018 7:16 AM, Shahaf Shuler wrote:
> 
> Thursday, July 12, 2018 3:02 PM, Mordechay Haimovsky:
>> Subject: [PATCH v3] net/mlx5: add support for 32bit 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 at mellanox.com>
> 
> Applied to next-net-mlx (again), thanks. 
> 
> Guidelines for 32b compilation and testing:
> 1. fetch the latest rdma-core from github. Make sure you have commit "708c8242 mlx5: Fix compilation on 32 bit systems when sse3 is on"
> 2. compile rdma-core for 32b by
> 	mkdir build32
> 	cd build32
> 	CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0 -DIOCTL_MODE=both (approach taken from rdma-core travis build https://github.com/linux-rdma/rdma-core/blob/master/buildlib/travis-build#L20) 
> 	Ninja (or ninja-build)
> 3. compile and run DPDK against build32 directory

I have confirmed the 32bit build with gcc, thanks for the update.

Only with 32bit ICC getting following errors [1] related to the #pragma usage.

[1]
.../dpdk/drivers/net/mlx5/mlx5_prm.h(14): error #2282: unrecognized GCC pragma
  #pragma GCC diagnostic ignored "-Wpedantic"
                         ^


More information about the dev mailing list