From owner-cvs-src@FreeBSD.ORG Fri Dec 24 23:11:42 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA3AD16A4CE; Fri, 24 Dec 2004 23:11:42 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E93D343D3F; Fri, 24 Dec 2004 23:11:41 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a130.otenet.gr [212.205.215.130]) iBONBQsc006431; Sat, 25 Dec 2004 01:11:33 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id iBONBKcc072642; Sat, 25 Dec 2004 01:11:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id iBONBKPA072641; Sat, 25 Dec 2004 01:11:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 25 Dec 2004 01:11:20 +0200 From: Giorgos Keramidas To: Scott Long Message-ID: <20041224231120.GA70659@gothmog.gr> References: <200412240914.iBO9EQwi030378@repoman.freebsd.org> <41CC8E1E.3020809@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41CC8E1E.3020809@freebsd.org> cc: Darren Reed cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/contrib/ipfilter/netinet ip_auth.cip_compat.h ip_frag.c ip_log.c ip_nat.h ip_proxy.c ip_state.c ip_state.h mlfk_ipl.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2004 23:11:43 -0000 On 2004-12-24 14:46, Scott Long wrote: > Darren Reed wrote: > >darrenr 2004-12-24 09:14:26 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/contrib/ipfilter/netinet ip_auth.c ip_compat.h ip_frag.c > > ip_log.c ip_nat.h ip_proxy.c > > ip_state.c ip_state.h mlfk_ipl.c > > Log: > > Enable fine grained locking within IPFilter, using mtx(9) and sx(9) > > allowing > > the the "needs giant" flag to be removed from the driver. > > I'm not sure how this could possibly compile on FreeBSD. Did you forget > to check in a file perhaps? Please fix this ASAP, otherwise it's going > to get reverted. Hi Scott, can you test this as a fix for the build problems? It seems to fix the buildkernel issues here. The arbitrary choise of __FreeBSD_version's value was based on this snippet from src/sys/ipfilter/netinet/ip_compat.h: 427 #if defined(__FreeBSD_version) && (__FreeBSD_version >= 500043) 428 # include 429 # include 430 # include 431 # define USE_MUTEX 1 432 # define kmutex_t struct mtx 433 # define KRWLOCK_T struct sx 434 # define NETBSD_PF 435 #endif %%% Index: sys/contrib/ipfilter/netinet/fil.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/ipfilter/netinet/fil.c,v retrieving revision 1.40 diff -u -r1.40 fil.c --- sys/contrib/ipfilter/netinet/fil.c 16 Dec 2004 21:02:15 -0000 1.40 +++ sys/contrib/ipfilter/netinet/fil.c 24 Dec 2004 22:49:58 -0000 @@ -115,10 +115,10 @@ # define FR_VERBOSE(verb_pr) # define FR_DEBUG(verb_pr) # define IPLLOG(a, c, d, e) ipflog(a, c, d, e) -# if SOLARIS || defined(__sgi) +# if SOLARIS || defined(__sgi) || (__FreeBSD_version >= 500043) extern KRWLOCK_T ipf_mutex, ipf_auth, ipf_nat; extern kmutex_t ipf_rw; -# endif /* SOLARIS || __sgi */ +# endif /* SOLARIS || __sgi || __FreeBSD_version */ #endif /* _KERNEL */ Index: sys/contrib/ipfilter/netinet/ip_fil.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/ipfilter/netinet/ip_fil.c,v retrieving revision 1.49 diff -u -r1.49 ip_fil.c --- sys/contrib/ipfilter/netinet/ip_fil.c 29 Sep 2004 04:54:32 -0000 1.49 +++ sys/contrib/ipfilter/netinet/ip_fil.c 24 Dec 2004 22:49:49 -0000 @@ -171,6 +171,9 @@ extern int tcp_mtudisc; extern kmutex_t ipf_rw; extern KRWLOCK_T ipf_mutex; +# elif (__FreeBSD_version >= 500043) +extern kmutex_t ipf_rw; +extern KRWLOCK_T ipf_mutex; # endif #else void init_ifp __P((void)); %%%