Check that port is started when MAC filter is set
authorgnn <gnn@FreeBSD.org>
Tue, 22 Apr 2014 20:19:09 +0000 (20:19 +0000)
committergnn <gnn@FreeBSD.org>
Tue, 22 Apr 2014 20:19:09 +0000 (20:19 +0000)
commitd294fbecbe054fa6560cd4cdbef4182146b8cbe2
tree31b67b8c92d797e072005109729256228bb324d1
parent4436d2d38c66363f706def0a5ba0f0edc718e2c9
Check that port is started when MAC filter is set

The MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
flag which implies port started, but it is not guaranteed to remain.
softc_lock shared lock can't be held in the case of these ioctls processing,
since it results in failure where kernel complains that non-sleepable
lock is held in sleeping thread.

Both problems are repeatable on LAG with LACP proto bring up.

Submitted by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

MFC after: 2 weeks
sys/dev/sfxge/sfxge_port.c