HomeFreeBSD

netgraph: Exit the net epoch to handle control messages

Description

netgraph: Exit the net epoch to handle control messages

In general, in the direct dispatch case netgraph only enters the net
epoch to send data messages, but this was inconsistent with the netgraph
thread, which also entered the net epoch to send fn and fn2 messages to
nodes. Some handlers, e.g., ng_bridge_newhook(), may sleep, and so
cannot be called in epoch context; the netgraph tests occasionally panic
due to this problem.

Make ngthread() consistent with the direct dispatch path.

Discussed with: afedorov (in D44615)
MFC after: 2 weeks
Sponsored by: Klara, Inc.

Details

Provenance
markjAuthored on Nov 21 2024, 6:55 PM
Parents
rG30cafaa9611d: devd tests: Fix client_test
Branches
Unknown
Tags
Unknown