aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <[email protected]>2023-12-08 16:28:41 -0300
committerJakub Kicinski <[email protected]>2023-12-11 18:52:56 -0800
commitc5e2a973448d958feb7881e4d875eac59fdeff3d (patch)
tree30c9435b1e4a1b09a3e9d56b4ff57ecfcce452a3 /tools/testing/selftests/bpf/progs/test_autoload.c
parent70028b2e51c61d8dda0a31985978f4745da6a11b (diff)
rtnl: add helper to check if rtnl group has listeners
As of today, rtnl code creates a new skb and unconditionally fills and broadcasts it to the relevant group. For most operations this is okay and doesn't waste resources in general. When operations are done without the rtnl_lock, as in tc-flower, such skb allocation, message fill and no-op broadcasting can happen in all cores of the system, which contributes to system pressure and wastes precious cpu cycles when no one will receive the built message. Introduce this helper so rtnetlink operations can simply check if someone is listening and then proceed if necessary. Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Victor Nogueira <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions