Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: snmp: remove SNMP_MIB_SENTINEL

No more user of SNMP_MIB_SENTINEL, we can remove it.

Also remove snmp_get_cpu_field[64]_batch() helpers.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20250905165813.1470708-10-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
20d3d268 c73d583e

-28
-23
include/net/ip.h
··· 326 326 } 327 327 #endif 328 328 329 - #define snmp_get_cpu_field64_batch(buff64, stats_list, mib_statistic, offset) \ 330 - { \ 331 - int i, c; \ 332 - for_each_possible_cpu(c) { \ 333 - for (i = 0; stats_list[i].name; i++) \ 334 - buff64[i] += snmp_get_cpu_field64( \ 335 - mib_statistic, \ 336 - c, stats_list[i].entry, \ 337 - offset); \ 338 - } \ 339 - } 340 - 341 329 #define snmp_get_cpu_field64_batch_cnt(buff64, stats_list, cnt, \ 342 330 mib_statistic, offset) \ 343 331 { \ ··· 336 348 mib_statistic, \ 337 349 c, stats_list[i].entry, \ 338 350 offset); \ 339 - } \ 340 - } 341 - 342 - #define snmp_get_cpu_field_batch(buff, stats_list, mib_statistic) \ 343 - { \ 344 - int i, c; \ 345 - for_each_possible_cpu(c) { \ 346 - for (i = 0; stats_list[i].name; i++) \ 347 - buff[i] += snmp_get_cpu_field( \ 348 - mib_statistic, \ 349 - c, stats_list[i].entry); \ 350 351 } \ 351 352 } 352 353
-5
include/net/snmp.h
··· 36 36 .entry = _entry, \ 37 37 } 38 38 39 - #define SNMP_MIB_SENTINEL { \ 40 - .name = NULL, \ 41 - .entry = 0, \ 42 - } 43 - 44 39 /* 45 40 * We use unsigned longs for most mibs but u64 for ipstats. 46 41 */