Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can: fix ack number with a high pid #278

Merged
merged 1 commit into from
Oct 25, 2024
Merged

can: fix ack number with a high pid #278

merged 1 commit into from
Oct 25, 2024

Conversation

fouge
Copy link
Collaborator

@fouge fouge commented Oct 22, 2024

ack number uses the pid in the 16 most significant bits (and a counter in the lower 16 bits),
this allows us to filter out acks that are not
for the current process.
But, the pid can be encoded over more than 16 bits, so this fix allows the usage of the 16 lsb of the pid in the ack number, the msb of the pid are lost.

fixes that bug where the ack got ignored because the pid is higher than u16::MAX

2024-10-22T08:07:22.879010Z DEBUG orb_mcu_interface: Ignoring ack # 0xd013002b
2024-10-22T08:07:23.340840Z ERROR orb_mcu_util::orb::main_board: error asking for firmware version: ack not received (isotp)

ack number uses the pid in the 16 most significant bits
(and a counter in the lower 16 bits),
this allows us to filter out acks that are not
for the current process.
But, the pid can be encoded over more than 16 bits,
so this fix allows the usage of the 16 lsb of the pid
in the ack number, the msb of the pid are lost.
@fouge fouge requested a review from TheButlah October 22, 2024 08:18
@fouge fouge merged commit a53f4cc into main Oct 25, 2024
10 checks passed
@fouge fouge deleted the fouge/ack-number-pid branch October 25, 2024 07:23
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.

2 participants