netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 1/3] meta: add random and probability match
@ 2016-07-05  7:35 Florian Westphal
  2016-07-05  7:35 ` [PATCH nft 1/3] meta: add random expression key Florian Westphal
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Florian Westphal @ 2016-07-05  7:35 UTC (permalink / raw)
  To: netfilter-devel

Hi.

This is yet another attempt at the random/probability matching.

First patch adds a simple 'meta random' expression.

Second patch adds a 'probability' mode which internally maps to
the random one and takes care of scaling the '0.x' probability
to the needed integer.

Third patch is the reverse translation, so that users that
input

meta probability 0.001

will see the same on list instead of

meta random <= 4294967

Patch 2 and 3 use meta statement to add this probability mode.

Let me know, if needed I can also only push patch #1.

I also have a patch for meta.t to add tests for this.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-07-18 22:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05  7:35 [PATCH nft 1/3] meta: add random and probability match Florian Westphal
2016-07-05  7:35 ` [PATCH nft 1/3] meta: add random expression key Florian Westphal
2016-07-18 19:34   ` Pablo Neira Ayuso
2016-07-18 22:09     ` Florian Westphal
2016-07-05  7:35 ` [PATCH nft 2/3] meta: add short-hand mnemonic for probalistic matching Florian Westphal
2016-07-14 10:41   ` Pablo Neira Ayuso
2016-07-14 10:52     ` Florian Westphal
2016-07-14 11:32       ` Pablo Neira Ayuso
2016-07-14 12:08         ` Florian Westphal
2016-07-14 12:17           ` Pablo Neira Ayuso
2016-07-05  7:35 ` [PATCH nft 3/3] netlink_delinearize, meta: show meta prandom <= value as probability mnemonic Florian Westphal

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).