net: drop_monitor: support drop reason
In the commit c504e5c2f9 ("net: skb: introduce kfree_skb_reason()")
drop reason is introduced to the tracepoint of kfree_skb. Therefore,
drop_monitor is able to report the drop reason to users by netlink.
The drop reasons are reported as string to users, which is exactly
the same as what we do when reporting it to ftrace.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220209060838.55513-1-imagedong@tencent.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1710b52d7c
commit
5cad527d5f
2 changed files with 36 additions and 6 deletions
|
|
@ -93,6 +93,7 @@ enum net_dm_attr {
|
|||
NET_DM_ATTR_SW_DROPS, /* flag */
|
||||
NET_DM_ATTR_HW_DROPS, /* flag */
|
||||
NET_DM_ATTR_FLOW_ACTION_COOKIE, /* binary */
|
||||
NET_DM_ATTR_REASON, /* string */
|
||||
|
||||
__NET_DM_ATTR_MAX,
|
||||
NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue