1
0
Fork 0
alistair23-linux/include/linux/mlx5
Eran Ben Elisha 88b3d5c90e net/mlx5e: Fix port buffers cell size value
Device unit for port buffers size, xoff_threshold and xon_threshold is
cells. Fix a bug in driver where cell unit size was hard-coded to
128 bytes. This hard-coded value is buggy, as it is wrong for some hardware
versions.

Driver to read cell size from SBCAM register and translate bytes to cell
units accordingly.

In order to fix the bug, this patch exposes SBCAM (Shared buffer
capabilities mask) layout and defines.

If SBCAM.cap_cell_size is valid, use it for all bytes to cells
calculations. If not valid, fallback to 128.

Cell size do not change on the fly per device. Instead of issuing SBCAM
access reg command every time such translation is needed, cache it in
mlx5e_dcbx as part of mlx5e_dcbnl_initialize(). Pass dcbx.port_buff_cell_sz
as a param to every function that needs bytes to cells translation.

While fixing the bug, move MLX5E_BUFFER_CELL_SHIFT macro to
en_dcbnl.c, as it is only used by that file.

Fixes: 0696d60853 ("net/mlx5e: Receive buffer configuration")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-07-09 19:27:07 -07:00
..
accel.h net/mlx5: IPSec: Fix incorrect type for spi 2020-05-29 21:20:22 -07:00
cq.h net/mlx5: Update cq.c to new cmd interface 2020-04-23 21:42:03 +03:00
device.h net/mlx5: Introduce TLS RX offload hardware bits 2020-04-28 12:45:18 -07:00
doorbell.h net/mlx5: Remove spinlock support from mlx5_write64 2019-04-02 12:49:37 -07:00
driver.h net/mlx5e: Fix port buffers cell size value 2020-07-09 19:27:07 -07:00
eq.h net/mlx5: Use event mask based on device capabilities 2019-07-03 20:55:45 +03:00
eswitch.h net/mlx5: E-Switch, Enable reg c1 loopback when possible 2020-03-12 15:00:38 -07:00
fs.h net/mlx5: Add support in forward to namespace 2020-05-13 18:56:31 +03:00
fs_helpers.h {net,IB}/mlx5: Add ipsec helper 2018-04-04 12:06:27 -06:00
mlx5_ifc.h net/mlx5e: Fix port buffers cell size value 2020-07-09 19:27:07 -07:00
mlx5_ifc_fpga.h net/mlx5: fix spelling mistake "reserverd" -> "reserved" 2020-02-18 15:44:07 +02:00
port.h net/mlx5e: ethtool, Add support for EEPROM high pages query 2019-05-01 14:39:16 -07:00
qp.h RDMA/mlx5: Convert modify QP to use MLX5_SET macros 2020-05-27 16:07:49 -03:00
transobj.h net/mlx5: Update transobj.c new cmd interface 2020-04-23 21:42:16 +03:00
vport.h net/mlx5: Update vport.c to new cmd interface 2020-04-23 21:42:02 +03:00