Page MenuHomeFreeBSD

CXGBE: fix big-endian behaviour
ClosedPublic

Authored by wma on Nov 14 2017, 1:18 PM.
Tags
None
Referenced Files
F116332843: D13084.id35267.diff
Mon, May 5, 12:20 PM
Unknown Object (File)
Sun, May 4, 11:49 PM
Unknown Object (File)
Tue, Apr 22, 4:29 AM
Unknown Object (File)
Sat, Apr 19, 8:44 AM
Unknown Object (File)
Thu, Apr 17, 9:37 PM
Unknown Object (File)
Fri, Apr 11, 9:06 AM
Unknown Object (File)
Feb 10 2025, 11:20 AM
Unknown Object (File)
Feb 10 2025, 12:24 AM
Subscribers

Details

Summary

The setbit/clearbit pair casts the bitfield pointer

to uint8_t* which effectively treats its contents as
little-endian variable. The ffs() function accepts int as
the parameter, which is big-endian. Use uint8_t here to
avoid mismatch, as we have only 4 doorbells.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Can you please verify that the output of "sysctl dev.t6nex.0.doorbells " looks ok before commiting this? It should show the names of the bits and not just the numeric value.

This revision is now accepted and ready to land.Nov 14 2017, 4:54 PM

Yes, sysctl shows all doorbells just fine

root@:~ # sysctl dev.t6nex.0.doorbells
dev.t6nex.0.doorbells: 9<UDB,KDB>
root@:~ #

This revision was automatically updated to reflect the committed changes.