HomeFreeBSD

bridge: epoch-ification

Description

bridge: epoch-ification

Run the bridge datapath under epoch, rather than under the
BRIDGE_LOCK().

We still take the BRIDGE_LOCK() whenever we insert or delete items in
the relevant lists, but we use epoch callbacks to free items so that
it's safe to iterate the lists without the BRIDGE_LOCK.

Tests on mercat5/6 shows this increases bridge throughput significantly,
from 3.7Mpps to 18.6Mpps.

Reviewed by: emaste, philip, melifaro
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24250

Details

Provenance
kpAuthored on
Reviewer
emaste
Differential Revision
D24250: bridge: epoch-ification
Parents
rS360344: pf: Improve input validation
Branches
Unknown
Tags
Unknown