Page MenuHomeFreeBSD

CXGBE: fix big-endian behaviour
ClosedPublic

Authored by wma on Nov 14 2017, 1:18 PM.
Tags
None
Referenced Files
F131731268: D13084.id35231.diff
Fri, Oct 10, 5:31 PM
F131712706: D13084.diff
Fri, Oct 10, 1:46 PM
Unknown Object (File)
Thu, Oct 2, 4:21 AM
Unknown Object (File)
Sat, Sep 27, 2:08 AM
Unknown Object (File)
Sat, Sep 27, 12:48 AM
Unknown Object (File)
Fri, Sep 26, 6:58 PM
Unknown Object (File)
Aug 3 2025, 9:09 AM
Unknown Object (File)
Aug 1 2025, 6:53 PM
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 Skipped
Unit
Tests Skipped

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.