From owner-svn-src-all@FreeBSD.ORG Wed Feb 19 18:49:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC49679; Wed, 19 Feb 2014 18:49:06 +0000 (UTC) Received: from mail-ea0-x22b.google.com (mail-ea0-x22b.google.com [IPv6:2a00:1450:4013:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F1F9F16B9; Wed, 19 Feb 2014 18:49:05 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id f15so556540eak.2 for ; Wed, 19 Feb 2014 10:49:04 -0800 (PST) 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=5bkqIIsBRbi2jBertnQj2Yy+D3w1/oTQAbzfK2W4wJg=; b=D51tBpbtaadoPPasJTQu6R4RH8vEfKqQ8oqN7YWdNK+fElObT5dmtTOI/nN/RE+rxE hlTmbzLeb82sF/151rCbxuGWzXbiXcteMb1SglMR6KsxAmjpoDsNzcXnzYMnY9f32bLU pZgasjhu+NDYaP7iSRNRy8v0x+Ck806ZPdwK3A5YSqd1GLOl6B5w0SueFVvwd8wuU4wa hG1P92L/MPLsZsPxruSPuEcajr31KSeBr9hCo9HsfrHJeeUWyjx/najO4dkmw3d/mix7 k9K1xSFn/bOsG7hJ882moAtd1JPMdH6bSUpXvwWWN7VgySk0K9/gNzRPKtPBtamGX9hu mKHA== X-Received: by 10.15.81.196 with SMTP id x44mr41297244eey.31.1392835744327; Wed, 19 Feb 2014 10:49:04 -0800 (PST) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id u6sm3871838eep.11.2014.02.19.10.49.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 10:49:03 -0800 (PST) Sender: Mikolaj Golub Date: Wed, 19 Feb 2014 20:49:01 +0200 From: Mikolaj Golub To: Martin Matuska Subject: Re: svn commit: r262196 - head/sys/netpfil/pf Message-ID: <20140219184859.GA3844@gmail.com> References: <201402182217.s1IMHCeM077356@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201402182217.s1IMHCeM077356@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 18:49:06 -0000 On Tue, Feb 18, 2014 at 10:17:12PM +0000, Martin Matuska wrote: > Author: mm > Date: Tue Feb 18 22:17:12 2014 > New Revision: 262196 > URL: http://svnweb.freebsd.org/changeset/base/262196 > > Log: > De-virtualize pf_mtag_z [1] > Process V_pf_overloadqueue in vnet context [2] Martin I saw you reverted it but it looks you are going to work on it still, so one comment below. ... > -SLIST_HEAD(pf_overload_head, pf_overload_entry); > +struct pf_overload_head { > + SLIST_HEAD(, pf_overload_entry) head; > + struct vnet *vnet; > +}; > static VNET_DEFINE(struct pf_overload_head, pf_overloadqueue); > #define V_pf_overloadqueue VNET(pf_overloadqueue) ... > - SLIST_INIT(&V_pf_overloadqueue); > + SLIST_INIT(&V_pf_overloadqueue.head); > TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, &V_pf_overloadqueue); > + V_pf_overloadqueue.vnet = curvnet; Why not pass vnet as a context to pf_overload_task instead of &V_pf_overloadqueue? Then you would not need this hack with storing a vnet inside a vnet variable. -- Mikolaj Golub