Hi,
On 04/16/2014 11:00 PM, aurfalien wrote:
Hi,
I’ve a Solarflare SFN5162F dual port 10Gb ethernet adapter.
While the card works fine as individual ports, upon configuring LACP the
machine suddenly reboots.
Here are my commands;
ifconfig sfxge0 up
ifconfig sfxge1 up
ifconfig lagg0 create
* ifconfig lagg0 up laggproto lacp laggport sfxge0 laggport sfxge1 10.0.10.99/16
* This is were the system reboots.
please, find patch attached. It solves the problem for me.
I'll discuss it with Solarflare and then submit patch to be pushed to
subversion.
Regards,
Andrew.
I believe this to be a bug, should i post this on freebsd-b...@freebsd.org
The only thing in /var/crash is minfree.
- aurf
"Janitorial Services"
sfxge: check that port is started when MAC filter is set
MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. 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.
diff -r 8dc01b10eb64 sys/dev/sfxge/sfxge_port.c
--- a/sys/dev/sfxge/sfxge_port.c Tue Apr 15 10:32:43 2014 +0100
+++ b/sys/dev/sfxge/sfxge_port.c Sat Apr 19 14:49:46 2014 +0400
@@ -357,10 +357,21 @@
struct sfxge_port *port = &sc->port;
int rc;
- KASSERT(port->init_state == SFXGE_PORT_STARTED, ("port not started"));
-
mtx_lock(&port->lock);
- rc = sfxge_mac_filter_set_locked(sc);
+ /*
+ * The function may be called without softc_lock held in the
+ * case of SIOCADDMULTI and SIOCDELMULTI ioctls. 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.
+ */
+ if (port->init_state == SFXGE_PORT_STARTED)
+ rc = sfxge_mac_filter_set_locked(sc);
+ else
+ rc = 0;
mtx_unlock(&port->lock);
return rc;
}
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"