From owner-freebsd-bugs Tue Feb 5 9:10:11 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1AC8D37B429 for ; Tue, 5 Feb 2002 09:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g15HA2249602; Tue, 5 Feb 2002 09:10:02 -0800 (PST) (envelope-from gnats) Date: Tue, 5 Feb 2002 09:10:02 -0800 (PST) Message-Id: <200202051710.g15HA2249602@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Vladimir Ivanov Subject: Re: kern/34639: IPFW skipto works too slow Reply-To: Vladimir Ivanov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/34639; it has been noted by GNATS. From: Vladimir Ivanov To: Peter Pentchev Cc: bug-followup@FreeBSD.org Subject: Re: kern/34639: IPFW skipto works too slow Date: Tue, 05 Feb 2002 20:03:17 +0300 Peter Pentchev wrote: > On Tue, Feb 05, 2002 at 05:53:19PM +0300, wawa@yandex-team.ru wrote: > >>>Number: 34639 >>>Category: kern >>>Synopsis: IPFW skipto works too slow >>>Description: >>> >>The original implementation of skipto rule use brute-force to find the appropriate rule. >>The suggested implementation use indexed access. >> > > Your suggested implementation has just one drawback: it assumes that > the rule exists. AFAIR, the current skipto implementation will skip > to the lowest-numbered rule no lower than the specified one, so you > can safely delete the rule with that specific number and still rest > assured that the following rules will be honored. Yes you're right. But my idea was to make it more intuitive. The domcumented behaviour can be achived by a couple lines of code which can be placed in the ad_ and del_ procedure but not in chk_ . We can just fill the index with duplicated values. Doesn't it ? It's important because it saves running time significantly still. > > G'luck, > Peter > > Truly, -- Vladimir Ivanov OOO "Yandex" t. +7 095 974-3555 f. +7 095 974-3565 @: noc@yandex.net (corporate) wawa@yandex-team.ru (personal) www: yandex.ru -- My opinions may have changed, but not the fact that I am right. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message