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 12:12:06 +0100 [thread overview]
Message-ID: <20160304111206.GA31929@breakpoint.cc> (raw)
In-Reply-To: <alpine.LSU.2.20.1603032141160.3198@nerf40.vanv.qr>
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 (0x0000002a) to
0.99999999 (0xffffffd4).
(I'll wait a bit in case anyone has opinion where to suppress display of
LTE op and where to handle de-scaling of the kernel side integer back
to 0.12345 output).
next prev parent reply other threads:[~2016-03-04 11:12 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 [this message]
2016-03-04 12:34 ` Jan Engelhardt
2016-03-04 13:13 ` Florian Westphal
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=20160304111206.GA31929@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.