ixl: fix big-endian hardware interface handling - #2408
Open
mchoo7 wants to merge 1 commit into
Open
Conversation
kev009
suggested changes
Sep 5, 2026
kev009
left a comment
Member
There was a problem hiding this comment.
The majority of this looks fine but the rd64_osdep change is a hard blocker.
Contributor
Author
|
I'll ping you when I'm done with testing although it should be okay since the only change is reverting the one mentioned above. |
Correct the byte order at the driver interfaces that do not operate in host order. Encode little-endian Admin Queue VSI and MAC/VLAN fields, and decode firmware-provided queue handles, statistics indices, and event parameters before using them. Decode transmit descriptor writeback before examining it, and construct VLAN descriptor fields in host order for the final descriptor conversion. Store paged HMC descriptors in little-endian form and retain the selected field bits when reading HMC contexts. Keep MMIO values in host order for bus-space accessors and remove the obsolete le16_to_cpu no-op macro. In particular, retain the atomic bus_space_read_8() used for 64-bit registers. On big-endian systems, the unconverted perfect-match filter flag is presented to firmware as 0x0100 instead of 0x0001. Firmware rejects that command with EINVAL, leaving receive traffic functional only in promiscuous mode. MFC after: 2 weeks MFC to: stable/14, stable/15 Sponsored by: FreeBSD Foundation, Reliable Computer Systems Lab
kev009
self-requested a review
September 5, 2026 00:38
kev009
approved these changes
Sep 5, 2026
| ctxt.info.mapping_flags |= I40E_AQ_VSI_QUE_MAP_CONTIG; | ||
| ctxt.info.valid_sections = | ||
| htole16(I40E_AQ_VSI_PROP_QUEUE_MAP_VALID); | ||
| ctxt.info.mapping_flags = htole16(I40E_AQ_VSI_QUE_MAP_CONTIG); |
Member
There was a problem hiding this comment.
This = is a behavior change but I think it is technically correct and an improvement.
Contributor
Author
|
Works on ppc64. Added Reliable Computer Systems Lab to ping @bsdjhb for mentor approval |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct the byte order at the driver interfaces that do not operate in
host order. Encode little-endian Admin Queue VSI and MAC/VLAN fields,
and decode firmware-provided queue handles, statistics indices, and
event parameters before using them.
Decode transmit descriptor writeback before examining it, and construct
VLAN descriptor fields in host order for the final descriptor
conversion. Store paged HMC descriptors in little-endian form and retain
the selected field bits when reading HMC contexts.
Keep MMIO values in host order for bus-space accessors and remove the
obsolete le16_to_cpu no-op macro. In particular, retain the atomic
bus_space_read_8() used for 64-bit registers.
On big-endian systems, the unconverted perfect-match filter flag is
presented to firmware as 0x0100 instead of 0x0001. Firmware rejects that
command with EINVAL, leaving receive traffic functional only in
promiscuous mode.
MFC after: 2 weeks
MFC to: stable/14, stable/15
Sponsored by: FreeBSD Foundation, Reliable Computer Systems Lab
Tested on: FreeBSD 15.1 ppc64