From owner-freebsd-virtualization@FreeBSD.ORG Fri Apr 9 19:07:11 2010 Return-Path: Delivered-To: virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A86B1065673; Fri, 9 Apr 2010 19:07:11 +0000 (UTC) (envelope-from julianelischer@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id A25A98FC14; Fri, 9 Apr 2010 19:07:10 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so244955eyd.9 for ; Fri, 09 Apr 2010 12:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=C6LLTF0Gjrf9XnJOzR0zcFwjDYjmc6PAlGhmZE7r/1k=; b=aiZSwBoW64ukhAR+qsHefUAt4ya6jtSeM2Am2JXKPaFoJzUFuq/C6aobfdnpUuNqwk B83ywuEFI1fnbfeT2PRUyRnVcYK077dneaqfdj07X/CnxxF7lVIC32Om3GmrDKGkXyiM UTCcJKPD9DhK6PMtX8SRjtA5BnVWZfUnVIjiU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=GyUyWiUpPaMxY2utwuqxOnFtUgMRNr9KeAyJevYdAlOFnAnkY/Ot/hQgDgUMNebdjH g45ZuCkkQsz28Sfufunmz7mBVi2aKNGnHhq9+Fo5f9I2fkZ6bia07a9QoPkUcROS5Jz5 iXhMeLUZIs8ekhcah+ynfobZFOHPd+xDhYTZE= Received: by 10.213.56.76 with SMTP id x12mr611060ebg.66.1270838157343; Fri, 09 Apr 2010 11:35:57 -0700 (PDT) Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by mx.google.com with ESMTPS id 14sm937597ewy.6.2010.04.09.11.35.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Apr 2010 11:35:55 -0700 (PDT) Sender: Julian Elischer Message-ID: <4BBF7387.5010604@elischer.org> Date: Fri, 09 Apr 2010 11:35:51 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Luigi Rizzo References: <4BBCE3EE.506@halleforshunden.org> <20100407203802.GA91356@onelab2.iet.unipi.it> <4BBCF17F.4000408@elischer.org> <20100409141722.GA53191@onelab2.iet.unipi.it> In-Reply-To: <20100409141722.GA53191@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: virtualization@freebsd.org, anchie@freebsd.org, Anders Hagman Subject: Re: dummynet and vnet kernel panic X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 19:07:11 -0000 On 4/9/10 7:17 AM, Luigi Rizzo wrote: > On Wed, Apr 07, 2010 at 01:56:31PM -0700, Julian Elischer wrote: >> On 4/7/10 1:38 PM, Luigi Rizzo wrote: >>> On Wed, Apr 07, 2010 at 09:58:38PM +0200, Anders Hagman wrote: Note: different To: list >>>> Hi >>>> >>>> When using dummynet inside a vnet node with a simple pipe the kernel >>>> panic on the first packet. >>>> >>>> I use 8.0-STABLE cvsuped at 7 Apr 15:28 >>>> The ipfw code with dummynet is largely changed and the patch in the url >>>> below will not work. >>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=143621 >>>> >>>> Is there a fix in the near future? >>> >>> haven't tried it myself, but adapting the patch seems >>> reasonably trivial. I'll see what i can do. >>> >>> Are there any vnet experts who can comment ? >> >> the change itself looks as if it makes sense >> but I have not really tested it or gone to great length. >> >> ----------- >> >> the following URL gives you the change that was made to make the OLD >> version of dummynet Vimage compatible. >> >> http://p4db.freebsd.org/fileLogView.cgi?FSPC=//depot/projects/vimage/src/sys/netinet/ipfw/ip_dummynet.c > > Question: > the change in PR 143621 just makes sure that curvnet > points to something sensible while a packet is reinjected > by dummynet_send(); > the code in P4 does something completely different, as it > remaps the global variables to the per-vimage ones, and does > not seem to touch dummynet_send() at all. > So how does the code in P4 make sure that curvnet is set properly ? I can't say becasue I didn't do it. But I believe after that change, dummynet was virtualized, but as I didn't do it I can't say what was tested. > >> does this still apply to 8.x? or did you redo the dummynet in 8? >> if you didn't it may be worth looking to see if these changes apply to >> 8.x real soon before it's frozen. > > former global variables are now mostly in a single struct, dn_cfg. > There are however 150 lines where the global variable is used, so > I am bit scared at renaming all of these occurrences from dn_cfg > to V_dn_cfg. I'd rather follow a different approach, i.e it woudl work but we avoided that way because we specifically wantet to be able to see at a glance whether virtualization is involved somewhere. The change of name is just a single vi command.. > > VNET_DEFINE(struct dn_cfg, _base_dn_cfg); > #define dn_cfg VNET(_base_dn_cfg) > > would this make sense to you ? > > cheers > luigi