aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2020-06-22 09:03:31 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2020-07-09 19:27:07 -0700
commit88b3d5c90e9685be54dd5bc441970044020eca76 (patch)
tree0092815a27422b7daa70adbffcc4311e84954a2d /README
parentnet/mlx5e: Fix 50G per lane indication (diff)
downloadlinux-dev-88b3d5c90e9685be54dd5bc441970044020eca76.tar.xz
linux-dev-88b3d5c90e9685be54dd5bc441970044020eca76.zip
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: 0696d60853d5 ("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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions