net/mlx5e: Limit UMR length to the device's limitation
ConnectX-4 UMR (User Memory Region) MTT translation table offset in WQE is limited to U16_MAX, before this patch we ignored that limitation and requested the maximum possible UMR translation length that the netdev might need (MAX channels * MAX pages per channel). In case of a system with #cores > 32 and when linear WQE allocation fails, falling back to using UMR WQEs will cause the RQ (Receive Queue) to get stuck. Here we limit UMR length to min(U16_MAX, max required pages) (while considering the required alignments) on driver load, by default U16_MAX is sufficient since the default RX rings value guarantees that we are in range, dynamically (on set_ringparam/set_channels) we will check if the new required UMR length (num mtts) is still in range, if not, fail the request. Fixes: bc77b240 ('net/mlx5e: Add fragmented memory support for RX multi packet WQE') Signed-off-by:Saeed Mahameed <saeedm@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mellanox/mlx5/core/en.h 7 additions, 7 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en.h
- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c 19 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
- drivers/net/ethernet/mellanox/mlx5/core/en_main.c 8 additions, 3 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_main.c
- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c 6 additions, 6 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_rx.c
Please register or sign in to comment