Merge branch 'parisc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux-2.6-microblaze.git] / include / net / drop_monitor.h
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
27 net_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_ */