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

Fix merging of PyUmiPacket #262

Open
azaidy opened this issue Oct 11, 2024 · 0 comments
Open

Fix merging of PyUmiPacket #262

azaidy opened this issue Oct 11, 2024 · 0 comments

Comments

@azaidy
Copy link
Collaborator

azaidy commented Oct 11, 2024

Switchboard provides a way to merge PyUmiPacket instances here.

Currently, if the collective len of merged packets exceed 255 (umi limit), the len overflows and rolls back.
For example, if umi_len(cmd) is 254 and umi_len(other.cmd) is 5, the resulting merged packet has a len of (254+1) + (5+1) - 256 - 1 = 4 which is incorrect.

In order to support this case, the merge function must return false if the len of current packet and other packet exceed 255.

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

No branches or pull requests

1 participant