netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 3/4] meta: add probability matching
Date: Fri, 4 Mar 2016 14:13:06 +0100	[thread overview]
Message-ID: <20160304131306.GB31929@breakpoint.cc> (raw)
In-Reply-To: <alpine.LSU.2.20.1603041322500.8964@nerf40.vanv.qr>

Jan Engelhardt <jengelh@inai.de> wrote:
> On Friday 2016-03-04 12:12, Florian Westphal wrote:
> >Jan Engelhardt <jengelh@inai.de> wrote:
> >> >> >+		if (tmp >= UINT_MAX || d > 0.9999999)
> >> >> >+			return error(loc, "Probability " META_PROB_FMT " too %s", d, "big");
> >> >> 
> >> >> You are misappropriating some 430 points here. 0.9999999 maps to
> >> >> just 0xfffffe51.
> >> >
> >> >Sorry, I am not following.
> >> 
> >> 0.9999999997 is still a valid probability, but you are making it 
> >> impossible to select it by cutting off at d > 0.9999999000.
> >
> >I'll change it to allow one more digit, so that supported range will
> >be 0.00000001 [10^-8] (0x0000002a) to
> >   0.99999999 (0xffffffd4).
> 
> Let's ask differently. What precludes the use of the full range
> (0x0/0x1) [2*10^-10] to (0xffffffff)?

Mapping smallest probability to 0x1 and largest one to 0xffffffff
means I lose ability to print back a number as entered.

  reply	other threads:[~2016-03-04 13:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 17:56 [PATCH nft 1/3] expression: add helper to decide if operator needs to be shown Florian Westphal
2016-03-03 17:56 ` [PATCH nft 3/4] meta: add probability matching Florian Westphal
2016-03-03 19:36   ` Jan Engelhardt
2016-03-03 20:32     ` Florian Westphal
2016-03-03 20:45       ` Jan Engelhardt
2016-03-04 11:12         ` Florian Westphal
2016-03-04 12:34           ` Jan Engelhardt
2016-03-04 13:13             ` Florian Westphal [this message]
2016-03-03 17:56 ` [PATCH nft 4/4] meta: add tests for " Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160304131306.GB31929@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).