diff options
author | Håkon Bugge <[email protected]> | 2021-06-22 16:13:27 +0200 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2021-06-25 10:54:34 -0300 |
commit | e84045eab69c625bc0b0bf24d8e05bc65da1eed1 (patch) | |
tree | d62909844be0f9a4dd830dc718d83a3ef12ae7bf /lib/test_overflow.c | |
parent | ca0c448d2b9f43e3175835d536853854ef544e22 (diff) |
RDMA/cma: Fix incorrect Packet Lifetime calculation
An approximation for the PacketLifeTime is half the local ACK timeout.
The encoding for both timers are logarithmic.
If the local ACK timeout is set, but zero, it means the timer is
disabled. In this case, we choose the CMA_IBOE_PACKET_LIFETIME value,
since 50% of infinite makes no sense.
Before this commit, the PacketLifeTime became 255 if local ACK
timeout was zero (not running).
Fixed by explicitly testing for timeout being zero.
Fixes: e1ee1e62bec4 ("RDMA/cma: Use ACK timeout for RoCE packetLifeTime")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Håkon Bugge <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions