net: extend drop reasons for multiple subsystems
authorJohannes Berg <johannes.berg@intel.com>
Wed, 19 Apr 2023 12:52:53 +0000 (14:52 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Apr 2023 03:20:49 +0000 (20:20 -0700)
commit071c0fc6fb919dcf29c676a842dda08a674877d7
tree7062c1fde75461ef4cb2a5a3395f6d56b8812b70
parent5b8285cca6fed9bc5baabe2e5699a5a5c0d96371
net: extend drop reasons for multiple subsystems

Extend drop reasons to make them usable by subsystems
other than core by reserving the high 16 bits for a
new subsystem ID, of which 0 of course is used for the
existing reasons immediately.

To still be able to have string reasons, restructure
that code a bit to make the loopup under RCU, the only
user of this (right now) is drop_monitor.

Link: https://lore.kernel.org/netdev/00659771ed54353f92027702c5bbb84702da62ce.camel@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dropreason-core.h
include/net/dropreason.h [new file with mode: 0644]
net/core/drop_monitor.c
net/core/skbuff.c