From owner-freebsd-ipfw@FreeBSD.ORG Thu Dec 6 11:56:09 2012 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6104FBF; Thu, 6 Dec 2012 11:56:09 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 785468FC13; Thu, 6 Dec 2012 11:56:09 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Tga77-0003RI-Th; Thu, 06 Dec 2012 15:59:37 +0400 Message-ID: <50C087D2.6020607@FreeBSD.org> Date: Thu, 06 Dec 2012 15:56:02 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Subject: Re: ipfw(4) dynamic states/rules and its callout References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-net , freebsd-ipfw@freebsd.org X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 11:56:10 -0000 On 06.12.2012 13:13, Ermal Luçi wrote: > Hello, > > i was looking at ipfw dynamic code for dynamic states/rules and see that it > unconditionally schedules a callout even if there is not work to do. > > Wouldn't it be best to reschedule it when there is something to do to avoid > having a useless > callout/event run every time on the system? > > Is there any complication i am missing on it! I thought about the same (and possibly not allocating dynamic hash at all if we have no dynamic rules) while rewriting dynamic code. The main "problem" is to reliably determine if we have dynamic rules in our ruleset. Rule checking probably can be done via adding additional argument to check_ipfw_struct(), however the rest can be a bit more complicated since we can delete more that one rule (or set with bunch of rules) at once. > > Regards, > Ermal > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >