Netdev revamp (#145)

* begin working on netdev solution

* need to roll back some assumptions in next commit

* dual poll/async mode for netdev.Runner

* add wake on rx semantics

* remove TODO

* more reworking of Runner

* work on applying @MDr164 suggestions and a couple extra revamps

* add newline to end of test file
This commit is contained in:
Pat Whittingslow
2026-07-09 14:04:10 -03:00
committed by GitHub
parent 4fc53a84cd
commit 99e9d90a60
9 changed files with 1288 additions and 117 deletions
@@ -83,7 +83,17 @@ func main() {
var runner netdev.Runner[espradio.STAConfig]
go func() {
if err := runner.Run(context.Background(), iface, &stack, backoff); err != nil {
// EthPoll drains the C ring buffer and delivers frames through the
// receive handler, so the device is async but still needs the pump.
err := runner.Configure(netdev.RunnerConfig[espradio.STAConfig]{
Buffers: iface.RunnerBuffers(2),
Backoff: backoff,
Flags: netdev.RunnerInterfaceAsync | netdev.RunnerInterfacePoll,
})
if err != nil {
failIfErr("runnerconfig", err)
}
if err := runner.Run(context.Background(), &iface, &stack); err != nil {
failIfErr("runner", err)
}
}()