Skip to content

Extend MAXIBNAME to 20#371

Open
pizhenwei wants to merge 1 commit intoAtoptool:masterfrom
pizhenwei:ib-fix
Open

Extend MAXIBNAME to 20#371
pizhenwei wants to merge 1 commit intoAtoptool:masterfrom
pizhenwei:ib-fix

Conversation

@pizhenwei
Copy link
Copy Markdown
Contributor

The IB device name may exceeds original 12 bytes, for example a RXE device: rxe_enp161s0np0 (16 bytes with null terminated) then atop will read the truncated path:
/sys/class/infiniband/rxe_enp161s/ports/1/rate

however the correct path is:
/sys/class/infiniband/rxe_enp161s0np0/ports/1/rate

So atop fails to get the real rate, and set rate field to 0. Commit 19e7bbe("Avoid divide by zero when InfiniBand rate is 0") fixed the bottom part of using rate, and this change fixes the top part of collecting rate.

The IB device name may exceeds original 12 bytes, for example a RXE
device: rxe_enp161s0np0 (16 bytes with null terminated)
then atop will read the truncated path:
/sys/class/infiniband/rxe_enp161s/ports/1/rate

however the correct path is:
/sys/class/infiniband/rxe_enp161s0np0/ports/1/rate

So atop fails to get the real rate, and set rate field to 0.
Commit 19e7bbe("Avoid divide by zero when InfiniBand rate is 0")
fixed the bottom part of *using* rate, and this change fixes the top
part of *collecting* rate.

Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant