From owner-freebsd-virtualization@FreeBSD.ORG Fri Aug 22 01:03:45 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 955EE1065677 for ; Fri, 22 Aug 2008 01:03:45 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 2B2868FC29 for ; Fri, 22 Aug 2008 01:03:44 +0000 (UTC) (envelope-from silby@silby.com) Received: (qmail 20732 invoked from network); 22 Aug 2008 00:37:04 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 22 Aug 2008 00:37:04 -0000 X-pair-Authenticated: 209.68.2.70 Date: Thu, 21 Aug 2008 19:37:03 -0500 (CDT) From: Mike Silbersack To: Julian Elischer In-Reply-To: <48ABD349.6030701@elischer.org> Message-ID: References: <48ABD1EF.5060307@elischer.org> <48ABD349.6030701@elischer.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-virtualization@freebsd.org Subject: Re: report and comment 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, 22 Aug 2008 01:03:45 -0000 On Wed, 20 Aug 2008, Julian Elischer wrote: >> so we have the same global variables, static, in 2 places.. >> so one set should go in the pf vars and the other in the inet >> vars. The first answers I think of are: >> >> >> 1/ rename one set >> 2/ make one of them a VV_ macro that goes elsewhere. > > looking at the code better... I see the entire function is about the same.. > > 3/ remove the duplicated code in pf and call the one in tcp_subr.c > from both places.. The code originally came from tcp_subr.c, then Max copied it over to pf to improve pf's behavior. I'm guessing that he intentionally left them seperate so that the host part of the TCP stack wasn't interacting with the firewall part of the system. Renaming the variables in the pf copy is probably a better solution. -Mike