]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: tc-testing: u32: Add tests covering sample option
authorPhil Sutter <phil@nwl.cc>
Mon, 8 Feb 2021 15:10:04 +0000 (16:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Feb 2021 23:18:57 +0000 (15:18 -0800)
commitf0e90f9f7897b95ffdc5e853794c6ffafcf1528d
tree9128125fcf246b4272359768795738e3f08bd977
parent6b5fc4c8f1df1fd861f4566fc1d5348616e6da46
selftests: tc-testing: u32: Add tests covering sample option

Kernel's key folding basically consists of shifting away least
significant zero bits in mask and masking the resulting value with
(divisor - 1). Test for u32's 'sample' option to behave identical.

Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/tc-testing/tc-tests/filters/u32.json