Page MenuHomeFreeBSD

bhyve: Use a non-blocking read in slirp_recv()
ClosedPublic

Authored by markj on Dec 20 2024, 5:19 PM.
Tags
None
Referenced Files
F108675625: D48164.diff
Mon, Jan 27, 5:59 AM
Unknown Object (File)
Tue, Jan 7, 2:40 PM
Unknown Object (File)
Dec 26 2024, 10:20 AM
Unknown Object (File)
Dec 26 2024, 9:32 AM
Unknown Object (File)
Dec 26 2024, 8:27 AM
Unknown Object (File)
Dec 25 2024, 4:02 AM
Unknown Object (File)
Dec 23 2024, 4:20 PM
Subscribers

Details

Summary

When using the slirp backend with the e1000 frontend, I otherwise get
hangs in readv(), caused by the e1000 emulation not checking whether
bytes are available before trying to read them. In particular, that
device model expects the recv callback to return 0 if no bytes are
available, and with slirp it would end up blocking forever. The virtio
device model uses the peek_recvlen to check first, so I didn't notice
the problem when implementing the slirp backend.

Make the slirp backend more flexible to accommodate e1000.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61285
Build 58169: arc lint + arc unit

Event Timeline

markj requested review of this revision.Dec 20 2024, 5:19 PM
This revision was not accepted when it landed; it landed in state Needs Review.Tue, Jan 7, 2:35 PM
This revision was automatically updated to reflect the committed changes.