Repository navigation
hostmot2: bound Ethernet packets and check transfers - #4660
sleepybishop wants to merge 10 commits into
Conversation
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.
|
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. |
Thank you, should I remove them? Given the constraints they are unnecessary bloat. |
|
For inspiration you can take a look at some other tests, like |
|
Removed the standalone harness and build hook. |
| @@ -0,0 +1,30 @@ | |||
| HostMot2 Ethernet software regression tests | |||
There was a problem hiding this comment.
Same comment on the test as the pktuart changes.
|
|
||
| // terminal block, 10 pins used, enc 0-2 | ||
| // terminal block | ||
| board->llio.ioport_connector_name[1] = "TB1"; | ||
|
|
||
| // terminal block, 10 pins used, enc 3-5 | ||
| board->llio.ioport_connector_name[2] = "TB2"; | ||
|
|
||
| // terminal block, 8 pins used, Step & Dir 0-3 | ||
| board->llio.ioport_connector_name[3] = "TB3"; | ||
|
|
||
| // terminal block, 10 pins used, Step & Dir 4,5, serial Rx/Tx/Txen 0,1 | ||
| board->llio.ioport_connector_name[2] = "TB4"; | ||
|
|
||
| // terminal block, 8 inputs, 6 SSR outputs | ||
| board->llio.ioport_connector_name[3] = "TB5"; | ||
|
|
||
| // terminal block, 16 inputs | ||
| board->llio.ioport_connector_name[2] = "TB6"; |
There was a problem hiding this comment.
While the code is incorrect, the replacement is worse. The 7I95 and 7I95T manuals state TB1...TB6 to be present.
This needs to be checked to match reality.
Split from #4488 as requested. Checks Ethernet transfer lengths and queue bounds, reserves packet-trailer space, and resets queued reads after send failures.
Local builds pass. Mesa hardware validation remains pending.