HomeFreeBSD

Introduce sleepable locks into if_lagg.

Description

Introduce sleepable locks into if_lagg.

Before this change if_lagg was using nonsleepable rmlocks to protect its
internal state. This patch introduces another sx lock to protect code
paths that require sleeping, while still uses old rmlock to protect hot
nonsleepable data paths.

This change allows to remove taskqueue decoupling used before to change
interface addresses without holding the lock. Instead it uses sx lock to
protect direct if_ioctl() calls.

As another bonus, the new code synchronizes enabled capabilities of member
interfaces, and allows to control them with ifconfig laggX, that was
impossible before. This part should fix interoperation with if_bridge,
that may need to disable some capabilities, such as TXCSUM or LRO, to allow
bridging with noncapable interfaces.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D10514

Details

Provenance
mavAuthored on
Differential Revision
D10514: Introducing sleepable locks into if_lagg
Parents
rS317695: Emulate pre-r317061 ABI.
Branches
Unknown
Tags
Unknown