From owner-cvs-all@FreeBSD.ORG Tue Oct 19 21:51:14 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 926B116A4CF; Tue, 19 Oct 2004 21:51:14 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1690643D49; Tue, 19 Oct 2004 21:51:14 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i9JLpYWF046185; Tue, 19 Oct 2004 15:51:34 -0600 (MDT) (envelope-from scottl@freebsd.org) Message-ID: <41758BF6.5020909@freebsd.org> Date: Tue, 19 Oct 2004 15:49:42 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040929 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <200410192114.i9JLEvjQ001574@repoman.freebsd.org> In-Reply-To: <200410192114.i9JLEvjQ001574@repoman.freebsd.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/modules/ipdivert Makefile src/sys/netinet in_proto.c ip_divert.c ip_divert.h ip_fw2.c ip_fw_pfil.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2004 21:51:14 -0000 Andre Oppermann wrote: > andre 2004-10-19 21:14:57 UTC > > FreeBSD src repository > > Modified files: > sys/netinet in_proto.c ip_divert.c ip_divert.h > ip_fw2.c ip_fw_pfil.c > Added files: > sys/modules/ipdivert Makefile > Log: > Convert IPDIVERT into a loadable module. This makes use of the dynamic loadability > of protocols. The call to divert_packet() is done through a function pointer. All > semantics of IPDIVERT remain intact. If IPDIVERT is not loaded ipfw will refuse to > install divert rules and natd will complain about 'protocol not supported'. Once > it is loaded both will work and accept rules and open the divert socket. The module > can only be unloaded if no divert sockets are open. It does not close any divert > sockets when an unload is requested but will return EBUSY instead. > > Revision Changes Path > 1.1 +8 -0 src/sys/modules/ipdivert/Makefile (new) > 1.75 +0 -13 src/sys/netinet/in_proto.c > 1.101 +67 -8 src/sys/netinet/ip_divert.c > 1.4 +10 -4 src/sys/netinet/ip_divert.h > 1.82 +2 -4 src/sys/netinet/ip_fw2.c > 1.11 +13 -8 src/sys/netinet/ip_fw_pfil.c This is interesting. Have you measured performance/latency with this new scheme? Is it still possible to compile IPDIVERT into the kernel and avoid the indirect calls? Scott