]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Update RMT size calculation
authorDean Luick <dean.luick@cornelisnetworks.com>
Mon, 9 Jan 2023 19:04:29 +0000 (14:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:32 +0000 (13:55 +0100)
commitac4b197d9df3405e25ab533427ec896c9a72095f
treefd92862cc7a003d75e2d693f1abbd55dfe0fb961
parent7347cabfeae62a56bdc78b1cf710ae45680b5fd0
IB/hfi1: Update RMT size calculation

[ Upstream commit 84dcc93098c195369746d781e643bbdbc4c43d8c ]

Fix possible RMT overflow:  Use the correct netdev size.
Don't allow adjusted user contexts to go negative.

Fix QOS calculation: Send kernel context count as an argument since
dd->n_krcv_queues is not yet set up in earliest call.  Do not include
the control context in the QOS calculation.  Use the same sized
variable to find the max of krcvq[] entries.

Update the RMT count explanation to make more sense.

Signed-off-by: Dean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Link: https://lore.kernel.org/r/167329106946.1472990.18385495251650939054.stgit@awfm-02.cornelisnetworks.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hfi1/chip.c