From owner-freebsd-pf@FreeBSD.ORG Thu Sep 16 03:42:14 2004 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 674) id 3582016A4CF; Thu, 16 Sep 2004 03:42:14 +0000 (GMT) Delivered-To: mlaier@vampire.homelinux.org Received: (qmail 55742 invoked by uid 1005); 29 Jul 2003 12:41:40 -0000 Delivered-To: max@vampire.homelinux.org Received: (qmail 55739 invoked from network); 29 Jul 2003 12:41:39 -0000 Received: from moutng.kundenserver.de (212.227.126.171) by pd9e398b1.dip.t-dialin.net with SMTP; 29 Jul 2003 12:41:39 -0000 Received: from [212.227.126.164] (helo=mxng11.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19hUhs-0002kX-00 for max@vampire.homelinux.org; Tue, 29 Jul 2003 15:40:00 +0200 Received: from [206.53.239.180] (helo=turing.freelists.org) by mxng11.kundenserver.de with esmtp (Exim 3.35 #1) id 19hUhm-0006cX-00 for max@love2party.net; Tue, 29 Jul 2003 15:39:54 +0200 Received: from turing (localhost [127.0.0.1])ESMTP id 6BEDF39503C; Tue, 29 Jul 2003 08:45:21 -0500 (EST) Received: with ECARTIS (v1.0.0; list pf4freebsd); Tue, 29 Jul 2003 08:45:16 -0500 (EST) Delivered-To: pf4freebsd@freelists.org Received: from ns.kt-is.co.kr (unknown [211.218.149.125]) ESMTP id C6447394F83 for ; Tue, 29 Jul 2003 08:45:14 -0500 (EST) Received: from michelle.kt-is.co.kr ([220.76.118.193]) (authenticated bits=0) by ns.kt-is.co.kr (8.12.5/8.12.5) with ESMTP id h6TDZB7m052390 verify=FAIL); Tue, 29 Jul 2003 22:35:11 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.9/8.12.9) with ESMTP id h6TDcvJT006118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Jul 2003 22:38:57 +0900 (KST) (envelope-from yongari@michelle.kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.9/8.12.9/Submit) id h6TDcnuC006116; Tue, 29 Jul 2003 22:38:49 +0900 (KST) (envelope-from yongari) From: Pyun YongHyeon To: pf4freebsd@freelists.org Message-ID: <20030729133844.GA5934@kt-is.co.kr> References: <20030729021246.GA4291@kt-is.co.kr> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030729021246.GA4291@kt-is.co.kr> User-Agent: Mutt/1.4.1i X-Filter-Version: 1.9 (ns.kt-is.co.kr) Content-Transfer-Encoding: 8bit X-archive-position: 51 X-ecartis-version: Ecartis v1.0.0 Sender: pf4freebsd-bounce@freelists.org Errors-To: pf4freebsd-bounce@freelists.org X-original-sender: yongari@kt-is.co.kr Precedence: normal X-list: pf4freebsd X-UID: 152 X-Length: 4617 X-Mailman-Approved-At: Thu, 16 Sep 2004 03:55:51 +0000 cc: Dennis.Berger@BSDsystems.de Subject: [pf4freebsd] Re: patches for ALTQ on 5.1R X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Reply-To: pf4freebsd@freelists.org List-Id: Technical discussion and general questions about packet filter (pf) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Thu, 16 Sep 2004 03:42:14 -0000 X-Original-Date: Tue, 29 Jul 2003 22:38:44 +0900 X-List-Received-Date: Thu, 16 Sep 2004 03:42:14 -0000 On Tue, Jul 29, 2003 at 11:12:46AM +0900, To pf4freebsd@freelists.org wrote: > > Hello All, > > There is a patch for Dennis Berger's ALTQ. > This patch was posted to Dennis and he published the patch > on this URL. His next release will include this patch. > > http://www.nipsi.de/FreeBSD/altqfixes.0.1 > > Above patch solves Dennis' IF_POLL macro problem. It also > touches wi(4) driver and provide a new ALTQ driver tun(4). > Beware! Both wi(4) and tun(4) driver was not tested at all. > So you may get panics!(I just have fxp(4)) > I hope the tun(4) driver can be used to experiment > "prioritizing empty TCP acks". > Hello All, I got several random lockups when I enable ALTQ. If I ping to the victim system during boot, the system is paniced. I think this problem comes from ALTQ fxp(4) driver. Based on http://people.freebsd.org/~hmp/patches/if_fxp-alt.diff I made a patch for ALTQ fxp driver. This patch was generated after applying Dennis's ALTQ patch. I can't sure this patch solves all fxp(4) problems but it works for me at least up to now. --- ./sys.altq/dev/fxp/if_fxpvar.h.ORG Tue Jul 29 22:25:51 2003 +++ ./sys.altq/dev/fxp/if_fxpvar.h Tue Jul 29 22:13:34 2003 @@ -111,8 +111,14 @@ #define mtx_destroy(a) struct mtx { int dummy; }; #else -#define FXP_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define FXP_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define FXP_LOCK(_sc) do { \ + if (!mtx_owned(&(_sc)->sc_mtx)) \ + mtx_lock(&(_sc)->sc_mtx); \ +} while(0) +#define FXP_UNLOCK(_sc) do { \ + if (mtx_owned(&(_sc)->sc_mtx)); \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while(0) #endif /* Thanks. Regards, -- Pyun YongHyeon