CXGBE: fix get_filt to be endianness-aware
ClosedPublic

Authored by wma on Nov 15 2017, 12:55 PM.

Details

Summary
Unconditional 32-bit shift is not endianness-safe.
Modify the logic to work both on LE and BE.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wma created this revision.Nov 15 2017, 12:55 PM
np added a comment.Nov 15 2017, 9:29 PM

Have you tested this change on x86 to make sure it still works on LE hardware? It looks ok but it would be nice to test...

wma added a comment.Tue, Jan 9, 3:19 PM

Just tested on arm64 (LE), works fine.

np accepted this revision.Tue, Jan 9, 8:19 PM
This revision is now accepted and ready to land.Tue, Jan 9, 8:19 PM
This revision was automatically updated to reflect the committed changes.