Skip to content

hostmot2: bound Ethernet packets and check transfers - #4660

Open
sleepybishop wants to merge 5 commits into
LinuxCNC:masterfrom
sleepybishop:hostmot-eth
Open

sleepybishop wants to merge 5 commits into
LinuxCNC:masterfrom
sleepybishop:hostmot-eth

Conversation

@sleepybishop

@sleepybishop sleepybishop commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Split from #4488 as requested. Checks Ethernet transfer lengths and queue bounds, reserves packet-trailer space, and resets queued reads after send failures. A separate commit removes stale 7i95/7i95T connector assignments without changing the mapping.

Includes reproducible mock-socket tests. Local build, regression, sanitizer and static-analysis checks pass; Mesa hardware validation remains pending. Keeping this draft for review.

Route an empty receive queue through the existing soft-error policy before allocating the receive buffer or touching the socket. A failed queued send clears this queue even though HostMot2 still calls receive.

Cover failed and short sends, unchanged destinations, error-limit escalation, user reset, and a successful queued retry with mock I/O.
@sleepybishop
sleepybishop marked this pull request as ready for review October 10, 2026 03:17
@BsAtHome

Copy link
Copy Markdown
Contributor

The test cannot run without a writable RIP source tree. It also includes the raw hm2_eth source and needs to link with hostmot2 code just to build. The construct in the test is fragile and the compile step is not guaranteed to be stable. The compiler flags are also wrong with respect to how the normal code is compiled. There is currently no good way to perform tests like this.

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