From owner-freebsd-ipfw@FreeBSD.ORG Thu May 29 15:30:35 2014 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93E7C163 for ; Thu, 29 May 2014 15:30:35 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 688B6262A for ; Thu, 29 May 2014 15:30:35 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id kq14so535816pab.19 for ; Thu, 29 May 2014 08:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:thread-index :content-language; bh=/jVW2nbEkzRG9HSKPUF3Nsl2wpudjU+Ts9iTwMp9/6k=; b=QlZXHYOQ1B9miRqsF8xfAIfl86w6YHPfuqehRRGwehGyLNpjnPtpp2utulTY/AJBXu VK1H+vRTssssurGOgJiMn3WUZ/L0Of4SwHzPJ9h6418AhYZF70tw8anL0cRSjtrraKcF axreJJ16Lh/7C1TU2fSz2No/1qyBgB9u1ij8kIrYbU4NsaXuJl1q3b05OXIDlYxed3XI 2IkGczBqVM78MfnTEGYvO3676buZ3Up1f6uEfcaCIjqn7k//Oi6ERLj9cgIauWie0pjb 0uCwG20vVzbx/YR9d81tIbjyMBCPn1PZLTN6y9f8ekIAolc+iS28ushGCDQgyofqn/Kj xLBg== X-Received: by 10.68.173.65 with SMTP id bi1mr9968535pbc.130.1401377434686; Thu, 29 May 2014 08:30:34 -0700 (PDT) Received: from billwin7 (amx-tls2.starhub.net.sg. [203.116.164.12]) by mx.google.com with ESMTPSA id mt1sm1798334pbb.31.2014.05.29.08.30.32 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 May 2014 08:30:34 -0700 (PDT) From: "bycn82" To: "'Luigi Rizzo'" , References: <201405291520.s4TFK124032925@freefall.freebsd.org> In-Reply-To: <201405291520.s4TFK124032925@freefall.freebsd.org> Subject: RE: kern/189720: [ipfw] [patch] pps action for ipfw Date: Thu, 29 May 2014 23:30:31 +0800 Message-ID: <007f01cf7b52$efd8a0c0$cf89e240$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHbWuE+qjuTx3is0SfKFp0zAb5aLJs/7YGg Content-Language: en-us X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 15:30:35 -0000 I got it, if the HZ=3D3, it always cannot meet the " 1 packet per 500ms" = perfectly.=20 But if we to "X packet per Y ticks", actually the result is the same, = still cannot meet the "1 packet per 500 ms" perfectly, instead, the = "packet per Y ticks" will force user to use " X packet per Y*300 ms". = And the user need to understand how many millisecond each tick is . =20 So I will update it this weekend.=20 > -----Original Message----- > From: owner-freebsd-ipfw@freebsd.org [mailto:owner-freebsd- > ipfw@freebsd.org] On Behalf Of 'Luigi Rizzo' > Sent: 29 May, 2014 23:20 > To: freebsd-ipfw@FreeBSD.org > Subject: Re: kern/189720: [ipfw] [patch] pps action for ipfw >=20 > The following reply was made to PR kern/189720; it has been noted by > GNATS. >=20 > From: 'Luigi Rizzo' > To: bycn82 > Cc: bug-followup@FreeBSD.org > Subject: Re: kern/189720: [ipfw] [patch] pps action for ipfw > Date: Thu, 29 May 2014 17:17:59 +0200 >=20 > On Thu, May 29, 2014 at 11:06:27PM +0800, bycn82 wrote: > > > > > > -----Original Message----- > > From: Luigi Rizzo [mailto:rizzo@iet.unipi.it] > Sent: 29 May, 2014 = 22:12 > To: > bug-followup@FreeBSD.org; bycn82@gmail.com > Subject: kern/189720: > [ipfw] [patch] pps action for ipfw > > Hi, > I have looked at the = update from > May 13th but it is not ready yet, the code assumes HZ=3D1000 so 1 = tick=3D1ms. > > > > The translation can be done in userspace or in the kernel. > > I would prefer the latter. > > I see, > > If the HZ=3D3, that means every tick=3D333ms > And if the user = wants to ??? 1 > packet per 500ms???, then in the backend will not do the exactly the = same as > what user expect. > > > > Actually the implementation should be ???packets per ticks???, so = how > about this? Instead of translate it in codes. Why not update the = document, > and explain it to the user in the document ? >=20 > 'Packets per tick' this is not a useful specification since the = tick's duration is > unknown to the user. > Depending on the platform you can have HZ ranging from 15-20 (on = windows) > to 10000 or even more. Normal values are 100, 250, 1000 but you just = cannot > know what you are going to get. >=20 > Yes there are rounding issues, and yes it is boring to write code to = handle > them. >=20 > luigi > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to = "freebsd-ipfw-unsubscribe@freebsd.org"