Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bnxt_re/lib: Fix the stride calculation for MSN/PSN area #1454

Merged
merged 1 commit into from May 8, 2024

Conversation

selvintxavier
Copy link
Contributor

Library expects ilog2 of psn_size while calculating the stride. ilog32 returns log2(v) + 1 and the calculation fails since the psn size is a power of 2 value. Fix by passing psn_size - 1.

Fixes: 0a0e0d0 ("bnxt_re/lib: Adds MSN table capability for Gen P7 adapters")

Library expects ilog2 of psn_size while calculating the stride.
ilog32 returns log2(v) + 1 and the calculation fails since
the psn size is a power of 2 value. Fix by passing psn_size - 1.

Fixes: 0a0e0d0 ("bnxt_re/lib: Adds MSN table capability for Gen P7 adapters")
Signed-off-by: Selvin Xavier <[email protected]>
@rleon rleon merged commit cf8f356 into linux-rdma:master May 8, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants