Skip to content

Fix packet buffer drop - #81

Open
jflarin-oti wants to merge 3 commits into
Xilinx:mainfrom
jflarin-oti:fix_packet_buffer_drop
Open

jflarin-oti wants to merge 3 commits into
Xilinx:mainfrom
jflarin-oti:fix_packet_buffer_drop

Conversation

@jflarin-oti

Copy link
Copy Markdown

A bug has been observed on the bench on a forked version of OpenNic.

The bug generates message similar to this on the dmesg:
onic: QDMA error active: idx=21 reg=C2H_ERR_STAT(0xaf0) mask=0x00000002 - Packet length mismatch error
onic: QDMA error active: idx=35 reg=C2H_FATAL_ERR_STAT(0xaf8) mask=0x00000002 - Fatal Len mismatch error

There is a bug when the drop input happens EXACTLY on last input (tvalid+tlast+tready)
drop_busy is asserted, but drop_in_prog is RESET.
So ram_addra_checkpoint is not updated and packet is not read out, as it should for a dropped packet.
However the size is still written in the size_fifo_inst because size_fifo_wr_en is masked by dropped signal (ie: the signal not set when drop occurs only on the tvalid+tready+tlast). This produces a mismatch between the packet data and the size fifo.

Jean-Francois Larin added 3 commits August 24, 2026 18:10
…lid+tlast+tready)

drop_busy is asserted, but drop_in_prog is RESET.
So ram_addra_checkpoint is not updated and packet is not read out.
However the size is still written in the size_fifo_inst because size_fifo_wr_en is masked by dropped.  This produces a mismatch between the packet data and the size fifo.
…lid+tlast+tready)

drop_busy is asserted, but drop_in_prog is RESET.
So ram_addra_checkpoint is not updated and packet is not read out.
However the size is still written in the size_fifo_inst because size_fifo_wr_en is masked by dropped.  This produces a mismatch between the packet data and the size fifo.

Signed-off-by: Jean-Francois Larin <jflarin@orthogone.com>
@jflarin-oti

Copy link
Copy Markdown
Author

Note that this is my first pull request on github. If there is something incorrect with this PR, please educate me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant