From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 08:22:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8E19A53A; Sat, 13 Jul 2013 08:22:05 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-la0-x235.google.com (mail-la0-x235.google.com [IPv6:2a00:1450:4010:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8A2170D; Sat, 13 Jul 2013 08:22:04 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id fs12so8360040lab.12 for ; Sat, 13 Jul 2013 01:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=A4W4a+TP4z5DEE+fqSNuStCi4a2imz8L8mb0nlymRE4=; b=NJh76b9At5Vpl/7SEnXxeNc+e761Iyg98ZAhhJn2MErDBrmwajqtZicg2v/e53Hsr7 zBPzrfs/UGu0hHI9QDgBJwVZ4XmHkfrk6j6m7vnlJHGfl/mZ/YbjnAeIcpS3QVaQmKVQ ZY0JL2spsIdx1B6RVQ+Pva9MS2QxLhRzs9k6wVbQCinlm9l0/ZA3ZzVxCjo0DNuLax6l llnm20fKLmYd0TYc6O5j7P/AYVkAbDC8+/33KpAVpCP0EvB/Qv/4Rjbehn2zcRHF6XPD 3NCNNzjwO5zyMw9dD/v0SVCJrzkh4JrvbQipAFWA9oCaNTrEPKv9nLcUoltpSa7LtU2E s/mg== X-Received: by 10.152.21.99 with SMTP id u3mr21393170lae.18.1373703723263; Sat, 13 Jul 2013 01:22:03 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id am8sm15639863lac.1.2013.07.13.01.22.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 01:22:02 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 11:21:59 +0300 From: Mikolaj Golub To: Adrian Chadd Subject: Re: svn commit: r253314 - head/sys/net Message-ID: <20130713082158.GD2757@gmail.com> References: <201307130425.r6D4P31J078644@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307130425.r6D4P31J078644@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 08:22:05 -0000 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