Page MenuHomeFreeBSD

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

Authored by guest-seuros on Thu, Jun 4, 11:31 PM.
Referenced Files
F159134996: D57459.diff
Wed, Jun 10, 12:15 PM
Unknown Object (File)
Tue, Jun 9, 10:01 AM
Unknown Object (File)
Tue, Jun 9, 5:49 AM
Unknown Object (File)
Mon, Jun 8, 10:22 PM
Unknown Object (File)
Fri, Jun 5, 1:10 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

This revision is now accepted and ready to land.Sat, Jun 6, 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.