1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef _NET_DROP_MONITOR_H_ 4 #define _NET_DROP_MONITOR_H_ 5 6 #include <linux/ktime.h> 7 #include <linux/netdevice.h> 8 #include <linux/skbuff.h> 9 10 /** 11 * struct net_dm_hw_metadata - Hardware-supplied packet metadata. 12 * @trap_group_name: Hardware trap group name. 13 * @trap_name: Hardware trap name. 14 * @input_dev: Input netdevice. 15 */ 16 struct net_dm_hw_metadata { 17 const char *trap_group_name; 18 const char *trap_name; 19 struct net_device *input_dev; 20 }; 21 22 #if IS_ENABLED(CONFIG_NET_DROP_MONITOR) 23 void net_dm_hw_report(struct sk_buff *skb, 24 const struct net_dm_hw_metadata *hw_metadata); 25 #else 26 static inline void net_dm_hw_report(struct sk_buff * skb,const struct net_dm_hw_metadata * hw_metadata)27net_dm_hw_report(struct sk_buff *skb, 28 const struct net_dm_hw_metadata *hw_metadata) 29 { 30 } 31 #endif 32 33 #endif /* _NET_DROP_MONITOR_H_ */ 34