From owner-svn-src-all@freebsd.org Thu Jun 30 03:03:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41E45B867C2; Thu, 30 Jun 2016 03:03:08 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B132821C5; Thu, 30 Jun 2016 03:03:07 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ISFpbR3ldBLFmISFqbsbeu; Wed, 29 Jun 2016 21:03:05 -0600 X-Authority-Analysis: v=2.2 cv=W5d6blek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=pD_ry4oyNxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=HQEh2bmjY8YPF31ghtgA:9 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A1B4B13752; Wed, 29 Jun 2016 20:03:01 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u5U331J9003137; Wed, 29 Jun 2016 20:03:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201606300303.u5U331J9003137@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Bjoern A. Zeeb" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302289 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from "Bjoern A. Zeeb" of "Thu, 30 Jun 2016 01:32:12 -0000." <201606300132.u5U1WCUa093377@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 29 Jun 2016 20:03:01 -0700 X-CMAE-Envelope: MS4wfC55ZjDQ4p416sKVDKps0ICyW4clbr7rN0nviFT5FGxAziqbdBOuP/yz2e4T0rge+f8rZ8EQRCkuILMv+0s6z/hKDe6J0iql6qg1xxfb/dpaTjLH+Btg RMWMIECoyYCt/51RKpBI92UO1oRGtc5/9Pv72XeU8ooP1VIU0lhLg+2unwWZDIO++8qCdWC163cHD7mcF9kta/HmOE0JIpAjHnTOC2gCU2Te3KmEExHAD1Qk 3ilN9QCOPv85EiRTKwskHIpvuNMfndllOBgytX2gJOWOHeqaOSRBnxSwo1wxvZ2F X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Thu, 30 Jun 2016 03:03:08 -0000 In message <201606300132.u5U1WCUa093377@repo.freebsd.org>, "Bjoern A. Zeeb" wri tes: > Author: bz > Date: Thu Jun 30 01:32:12 2016 > New Revision: 302289 > URL: https://svnweb.freebsd.org/changeset/base/302289 > > Log: > Remove unused global variables as well as unused memory > allocations from ipfilter in preparation for VNET support. > > Suggested by: cy (see D7000) > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Approved by: re (gjb) > > Modified: > head/sys/contrib/ipfilter/netinet/ip_fil.h > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > head/sys/contrib/ipfilter/netinet/ip_nat.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jun 29 23:56:24 201 > 6 (r302288) > +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Thu Jun 30 01:32:12 201 > 6 (r302289) > @@ -1710,7 +1710,6 @@ typedef struct ipf_main_softc_s { > > #ifndef _KERNEL > extern int ipf_check __P((void *, struct ip *, int, void *, int, m > b_t **)); > -extern int (*ipf_checkp) __P((ip_t *, int, void *, int, mb_t **)); > extern struct ifnet *get_unit __P((char *, int)); > extern char *get_ifname __P((struct ifnet *)); > extern int ipfioctl __P((ipf_main_softc_t *, int, ioctlcmd_t, > > Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 29 23:5 > 6:24 2016 (r302288) > +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Jun 30 01:3 > 2:12 2016 (r302289) > @@ -99,10 +99,8 @@ MALLOC_DEFINE(M_IPFILTER, "ipfilter", "I > # endif > > > -static int (*ipf_savep) __P((void *, ip_t *, int, void *, int, str > uct mbuf **)); > static int ipf_send_ip __P((fr_info_t *, mb_t *)); > static void ipf_timer_func __P((void *arg)); > -int ipf_locks_done = 0; > > ipf_main_softc_t ipfmain; > > @@ -110,10 +108,6 @@ ipf_main_softc_t ipfmain; > # if defined(NETBSD_PF) > # include > # endif /* NETBSD_PF */ > -/* > - * We provide the ipf_checkp name just to minimize changes later. > - */ > -int (*ipf_checkp) __P((void *, ip_t *ip, int hlen, void *ifp, int out, mb_t > **mp)); > > > static eventhandler_tag ipf_arrivetag, ipf_departtag, ipf_clonetag; > @@ -221,11 +215,6 @@ ipfattach(softc) > } > > > - if (ipf_checkp != ipf_check) { > - ipf_savep = ipf_checkp; > - ipf_checkp = ipf_check; > - } > - > bzero((char *)ipfmain.ipf_selwait, sizeof(ipfmain.ipf_selwait)); > softc->ipf_running = 1; > > @@ -268,12 +257,6 @@ ipfdetach(softc) > #endif > callout_drain(&softc->ipf_slow_ch); > > -#ifndef NETBSD_PF > - if (ipf_checkp != NULL) > - ipf_checkp = ipf_savep; > - ipf_savep = NULL; > -#endif > - > ipf_fini_all(softc); > > softc->ipf_running = -2; > > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_nat.c Wed Jun 29 23:56:24 201 > 6 (r302288) > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Thu Jun 30 01:32:12 201 > 6 (r302289) > @@ -133,8 +133,6 @@ static const char rcsid[] = "@(#)$FreeBS > #define NBUMPSIDEDF(y,x)do { softn->ipf_nat_stats.ns_side[y].x++; \ > DT1(x, fr_info_t *, fin); } while (0) > > -frentry_t ipfnatblock; > - > static ipftuneable_t ipf_nat_tuneables[] = { > /* nat */ > { { (void *)offsetof(ipf_nat_softc_t, ipf_nat_lock) }, > @@ -275,9 +273,6 @@ static void ipf_nat_tabmove __P((ipf_nat > int > ipf_nat_main_load() > { > - bzero((char *)&ipfnatblock, sizeof(ipfnatblock)); > - ipfnatblock.fr_flags = FR_BLOCK|FR_QUICK; > - ipfnatblock.fr_ref = 1; > > return 0; > } > > Thank you Bjoern. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.