svn commit: r253314 - head/sys/net
Adrian Chadd
adrian at freebsd.org
Sun Jul 14 02:33:03 UTC 2013
I'll double-check at work on Monday and commit an update.
Thanks!
-adrian
On 13 July 2013 01:21, Mikolaj Golub <trociny at freebsd.org> wrote:
> On Sat, Jul 13, 2013 at 04:25:03AM +0000, Adrian Chadd wrote:
>
>> +static int
>> +lagg_sysctl_active(SYSCTL_HANDLER_ARGS)
>> +{
>> + struct lagg_softc *sc = (struct lagg_softc *)arg1;
>> + struct lagg_port *lp;
>> + int error;
>> +
>> + /* LACP tracks active links automatically, the others do not */
>> + if (sc->sc_proto != LAGG_PROTO_LACP) {
>> + sc->sc_active = 0;
>> + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
>> + sc->sc_active += LAGG_PORTACTIVE(lp);
>
> Shouldn't sc be wlocked here?
>
>> + }
>> +
>> + error = sysctl_handle_int(oidp, &sc->sc_active, 0, req);
>> + if ((error) || (req->newptr == NULL))
>> + return (error);
>> +
>> + return (0);
>> +}
>
> --
> Mikolaj Golub
More information about the svn-src-head
mailing list