diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-09-29 11:15:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-30 18:01:26 -0700 |
commit | 8ee2267ad33e0ba021e9dd9b437f773906cd99d6 (patch) | |
tree | de76d6f23aef6a840d6c56a39f54ae6bc13212ba /include | |
parent | 5855357cd40e8b2ccdcc30f8ae0dac3f0f892ccd (diff) |
drop_monitor: Convert to using devlink tracepoint
Convert drop monitor to use the recently introduced
'devlink_trap_report' tracepoint instead of having devlink call into
drop monitor.
This is both consistent with software originated drops ('kfree_skb'
tracepoint) and also allows drop monitor to be built as a module and
still report hardware originated drops.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/drop_monitor.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/include/net/drop_monitor.h b/include/net/drop_monitor.h deleted file mode 100644 index 3f5b6ddb3179..000000000000 --- a/include/net/drop_monitor.h +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _NET_DROP_MONITOR_H_ -#define _NET_DROP_MONITOR_H_ - -#include <linux/ktime.h> -#include <linux/netdevice.h> -#include <linux/skbuff.h> -#include <net/flow_offload.h> - -/** - * struct net_dm_hw_metadata - Hardware-supplied packet metadata. - * @trap_group_name: Hardware trap group name. - * @trap_name: Hardware trap name. - * @input_dev: Input netdevice. - * @fa_cookie: Flow action user cookie. - */ -struct net_dm_hw_metadata { - const char *trap_group_name; - const char *trap_name; - struct net_device *input_dev; - const struct flow_action_cookie *fa_cookie; -}; - -#if IS_REACHABLE(CONFIG_NET_DROP_MONITOR) -void net_dm_hw_report(struct sk_buff *skb, - const struct net_dm_hw_metadata *hw_metadata); -#else -static inline void -net_dm_hw_report(struct sk_buff *skb, - const struct net_dm_hw_metadata *hw_metadata) -{ -} -#endif - -#endif /* _NET_DROP_MONITOR_H_ */ |