Skip to content

Fix merging of PyUmiPacket #262

@azaidy

Description

@azaidy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions