Merge tag 'keys-fixes-20200329' of git://git.kernel.org/pub/scm/linux/kernel/git...
[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 #include <net/flow_offload.h>
10
11 /**
12  * struct net_dm_hw_metadata - Hardware-supplied packet metadata.
13  * @trap_group_name: Hardware trap group name.
14  * @trap_name: Hardware trap name.
15  * @input_dev: Input netdevice.
16  * @fa_cookie: Flow action user cookie.
17  */
18 struct net_dm_hw_metadata {
19         const char *trap_group_name;
20         const char *trap_name;
21         struct net_device *input_dev;
22         const struct flow_action_cookie *fa_cookie;
23 };
24
25 #if IS_REACHABLE(CONFIG_NET_DROP_MONITOR)
26 void net_dm_hw_report(struct sk_buff *skb,
27                       const struct net_dm_hw_metadata *hw_metadata);
28 #else
29 static inline void
30 net_dm_hw_report(struct sk_buff *skb,
31                  const struct net_dm_hw_metadata *hw_metadata)
32 {
33 }
34 #endif
35
36 #endif /* _NET_DROP_MONITOR_H_ */