From owner-svn-src-head@FreeBSD.ORG Fri Jun 7 10:46:35 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 45CB0FB4; Fri, 7 Jun 2013 10:46:35 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-x234.google.com (mail-bk0-x234.google.com [IPv6:2a00:1450:4008:c01::234]) by mx1.freebsd.org (Postfix) with ESMTP id 25CFB1749; Fri, 7 Jun 2013 10:46:33 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id d7so1768766bkh.25 for ; Fri, 07 Jun 2013 03:46:33 -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=CxnJcm3KPAt9Wx3sSmQywjfXmjrhYdhM4XhzriExqnk=; b=hcT+VzV/iBPF3y0edQ2sjg1lhVWCjkXYJJtMK/QCETWBuS+ft5as1dVy/Wym98Hhvr ahcs2J55hw2gLE0DUDPEQpjUilYkqwclRP5RfY71VF0uiIlkEXJ1IOqYABH3qwLdUylN LUJzk9023hHC64/FMTMLu3BZQa1XY2H5JZAtRlogQQIjQRwwhH1qQO3wpqXdwJLbKN8G Jb0qyvw0SerrXC67DJbN+TXLxRVEqVHkiJgPCaB5XI2omuOgGv6JxJoIEQ36Cjt2ihqd j5EALfV5Uv1MyX4zIILgY3XUlNKXaeggO970tY2Tw981Ny7kngMnOu7CTgPVFJW+4PKB jbEg== X-Received: by 10.204.227.201 with SMTP id jb9mr12193854bkb.96.1370601993128; Fri, 07 Jun 2013 03:46:33 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id i15sm30199475bkz.12.2013.06.07.03.46.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 03:46:32 -0700 (PDT) Sender: Mikolaj Golub Date: Fri, 7 Jun 2013 13:46:29 +0300 From: Mikolaj Golub To: Gleb Smirnoff Subject: Re: svn commit: r251490 - head/sys/net Message-ID: <20130607104628.GA96120@gmail.com> References: <201306071027.r57ARpaF056606@svn.freebsd.org> <20130607103307.GA1187@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130607103307.GA1187@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , zec@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: Fri, 07 Jun 2013 10:46:35 -0000 On Fri, Jun 07, 2013 at 02:33:08PM +0400, Gleb Smirnoff wrote: > On Fri, Jun 07, 2013 at 10:27:51AM +0000, Mikolaj Golub wrote: > M> Author: trociny > M> Date: Fri Jun 7 10:27:50 2013 > M> New Revision: 251490 > M> URL: http://svnweb.freebsd.org/changeset/base/251490 > M> > M> Log: > M> Properly set curvnet context in lagg_port_setlladdr() task handler. > M> > M> Reported by: Nikos Vassiliadis > M> Submitted by: zec > M> Tested by: Nikos Vassiliadis > M> MFC after: 1 week > M> > M> Modified: > M> head/sys/net/if_lagg.c > M> > M> Modified: head/sys/net/if_lagg.c > M> ============================================================================== > M> --- head/sys/net/if_lagg.c Fri Jun 7 09:06:50 2013 (r251489) > M> +++ head/sys/net/if_lagg.c Fri Jun 7 10:27:50 2013 (r251490) > M> @@ -505,7 +505,9 @@ lagg_port_setlladdr(void *arg, int pendi > M> ifp = llq->llq_ifp; > M> > M> /* Set the link layer address */ > M> + CURVNET_SET(ifp->if_vnet); > M> error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); > M> + CURVNET_RESTORE(); > M> if (error) > M> printf("%s: setlladdr failed on %s\n", __func__, > M> ifp->if_xname); > > IMHO, the entire task function should be embraced into VNET context. The VNET context is obtained from ifp, which is taken from the queue just one line above. It might be taken from lagg interface, supposing that all the lagg ports are in the same vnet, but this may not always be true, e.g. when you moving a lagg and its ports to another vnet, one by one. -- Mikolaj Golub