linux/drivers/infiniband/sw
Bob Pearson e02d63b008 RDMA/rxe: Compute PSN windows correctly
[ Upstream commit bb3ab2979f ]

The code which limited the number of unacknowledged PSNs was incorrect.
The PSNs are limited to 24 bits and wrap back to zero from 0x00ffffff.
The test was computing a 32 bit value which wraps at 32 bits so that
qp->req.psn can appear smaller than the limit when it is actually larger.

Replace '>' test with psn_compare which is used for other PSN comparisons
and correctly handles the 24 bit size.

Fixes: 8700e3e7c4 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20201013170741.3590-1-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:25:50 +01:00
..
rdmavt IB/rdmavt: Fix sizeof mismatch 2020-10-30 10:38:20 +01:00
rxe RDMA/rxe: Compute PSN windows correctly 2020-12-30 11:25:50 +01:00
Makefile Soft RoCE driver 2016-08-04 11:13:12 -04:00