summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ionic/ionic_datapath.c
diff options
context:
space:
mode:
authorOr Har-Toov <ohartoov@nvidia.com>2025-08-13 15:39:56 +0300
committerJason Gunthorpe <jgg@nvidia.com>2025-08-25 14:42:19 -0300
commit1a7c18c485bf17ef408d5ebb7f83e1f8ef329585 (patch)
tree40bce48b5dc258f09769e521e7e7f6ee02927691 /drivers/infiniband/hw/ionic/ionic_datapath.c
parentd9e6e85b7beb2aeb8defac2f705b23532ddb25d4 (diff)
RDMA/mlx5: Better estimate max_qp_wr to reflect WQE count
The mlx5 driver currently derives max_qp_wr directly from the log_max_qp_sz HCA capability: props->max_qp_wr = 1 << MLX5_CAP_GEN(mdev, log_max_qp_sz); However, this value represents the number of WQEs in units of Basic Blocks (see MLX5_SEND_WQE_BB), not actual number of WQEs. Since the size of a WQE can vary depending on transport type and features (e.g., atomic operations, UMR, LSO), the actual number of WQEs can be significantly smaller than the WQEBB count suggests. This patch introduces a conservative estimation of the worst-case WQE size — considering largest segments possible with 1 SGE and no inline data or special features. It uses this to derive a more accurate max_qp_wr value. Fixes: 938fe83c8dcb ("net/mlx5_core: New device capabilities handling") Link: https://patch.msgid.link/r/7d992c9831c997ed5c33d30973406dc2dcaf5e89.1755088725.git.leon@kernel.org Reported-by: Chuck Lever <cel@kernel.org> Closes: https://lore.kernel.org/all/20250506142202.GJ2260621@ziepe.ca/ Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_datapath.c')
0 files changed, 0 insertions, 0 deletions