Page MenuHomeFreeBSD

fix(fwe): add missing net epoch around ether_input
ClosedPublic

Authored by guest-seuros on Jun 4 2026, 11:31 PM.
Referenced Files
Unknown Object (File)
Tue, Jul 7, 10:08 AM
Unknown Object (File)
Sun, Jul 5, 5:28 PM
Unknown Object (File)
Thu, Jun 25, 6:44 AM
Unknown Object (File)
Tue, Jun 23, 2:25 PM
Unknown Object (File)
Mon, Jun 15, 7:45 PM
Unknown Object (File)
Mon, Jun 15, 7:21 PM
Unknown Object (File)
Mon, Jun 15, 7:21 PM
Unknown Object (File)
Mon, Jun 15, 8:41 AM
Subscribers

Details

Summary

Wrap the if_input() call in fwe_as_input() with NET_EPOCH_ENTER/EXIT.
The network stack requires epoch protection when delivering packets
via if_input, and fwe was missing it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73688
Build 70571: arc lint + arc unit

Event Timeline

hm, good question, should we do it per frame or in batches?

This revision is now accepted and ready to land.Jun 6 2026, 8:07 PM
This revision was automatically updated to reflect the committed changes.

hm, good question, should we do it per frame or in batches?

A bit late to see this patch.

The NET_EPOCH_ENTER() / NET_EPOCH_EXIT() is a bit heavy weight on every packet. For high speed hardware you want to batch input the packets. For firewire I think it is not a high speed hardware so that ( batch input ) probably make no noticeable difference.

hm, good question, should we do it per frame or in batches?

A bit late to see this patch.

The NET_EPOCH_ENTER() / NET_EPOCH_EXIT() is a bit heavy weight on every packet. For high speed hardware you want to batch input the packets. For firewire I think it is not a high speed hardware so that ( batch input ) probably make no noticeable difference.

Yeah, I've asked seuros about reproducing it, we can clean this up in a follow-up commit (populate a work list in the loop, then do enter/loop-if-input/exit).

I wanted the code in -head to work first, then we can make it faster-er. :-)

Thanks for reviewing it tho!

Out of curiosity: what hardware do you use to encounter this bug? Is it legacy (about 15 year old) mainboard or is it something new like https://www.startech.com/en-us/cards-adapters/firewire?

Apple Computers (Imacs, MacMini, Laptops), Lenovo T61p, Startech, SIIG, LACIE.

I daisy chained 3 computers and tried to push a tar file from computer 1 to 3 with a fw800 or fw400 link.

The panic happens with any revision.