aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorJani Nikula <[email protected]>2024-08-14 13:00:34 +0300
committerJani Nikula <[email protected]>2024-08-16 12:07:45 +0300
commit3942bb49728ad9e1f94d953a88af169a8f5d8099 (patch)
treefec8c1b5af91b41dd8a3af66ee57c7ebce2405a0 /tools/perf/scripts/python/net_dropmonitor.py
parent8befe8fa5a4e4b30787b17e078d9d7b5cb92ea19 (diff)
string: add mem_is_zero() helper to check if memory area is all zeros
Almost two thirds of the memchr_inv() usages check if the memory area is all zeros, with no interest in where in the buffer the first non-zero byte is located. Checking for !memchr_inv(s, 0, n) is also not very intuitive or discoverable. Add an explicit mem_is_zero() helper for this use case. Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions