]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Configure cache line size for start and end padding
authorDaniel Jurgens <danielj@mellanox.com>
Thu, 19 Nov 2015 15:12:26 +0000 (17:12 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 6 Feb 2017 16:17:25 +0000 (18:17 +0200)
commit13b042fa26e20fa72700c4ae5e81256115b855d2
tree297e2374d3fff18fb0296597fa58399af3278953
parentfa55acc6565774f3495ebbc2e67010edb381bb89
net/mlx5: Configure cache line size for start and end padding

There is a hardware feature that will pad the start or end of a DMA to
be cache line aligned to avoid RMWs on the last cache line. The default
cache line size setting for this feature is 64B. This change configures
the hardware to use 128B alignment on systems with 128B cache lines.

In addition we lower bound MPWRQ stride by HCA cacheline in mlx5e,
MPWRQ stride should be at least the HCA cacheline, the current default
is 64B and in case HCA_CAP.cach_line_128byte capability is set, MPWRQ RX
stride will automatically be aligned to 128B.

Signed-off-by: Daniel Jurgens <danielj@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_main.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/mlx5_ifc.h