Repository navigation
Clear bits 31:16 on RSS indirection table reads - #83
Open
sidcraftscode wants to merge 1 commit into
Open
sidcraftscode wants to merge 1 commit into
sidcraftscode wants to merge 1 commit into
Conversation
A read of the indirection table (0x400 - 0x5FF) in qdma_subsystem_function_register only assigns reg_dout[15:0], so bits 31:16 keep whatever the previous read left there: 0xDEAD after an unmapped address, q_base after the queue config register, or part of a hash key word. The register map lists those bits as reserved. Zero-extend the table entry so the upper half reads as 0. Signed-off-by: Sid Chaudhary <sidchaudhary04@gmail.com>
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.
In
src/qdma_subsystem/qdma_subsystem_function_register.sv, a read of the RSS indirection table (0x400 to 0x5FF) only assignsreg_dout[15:0]. The other read paths write all 32 bits, so bits 31:16 of a table read keep whatever the previous read left: 0xDEAD after an unmapped address,q_baseafter the queue config register, or the top half of a hash key word. The register map at the top of the file lists those bits as reserved.The fix zero-extends the entry:
reg_dout <= {16'b0, reg_table[reg_addr[8:2]]};open-nic-driver masks the value with 0xFFFF in
onic_get_rxfh(), soethtool -xis fine today. Anything else that reads the table back as a full word sees the stale bits.Checked with a Verilator testbench over AXI-Lite. Reading table[5] (set to 3) right after an unmapped read, a qconf read and a hash key read returned 0xDEAD0003, 0x00100003 and 0xD6E30003 before the change, and 0x00000003 each time after.