accel/ivpu: Enable HWS by default on all platforms
[drm/drm-misc.git] / include / net / netkit.h
blob9ec0163739f45156657cb0d1b0f895514dd022a9
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2023 Isovalent */
3 #ifndef __NET_NETKIT_H
4 #define __NET_NETKIT_H
6 #include <linux/bpf.h>
8 #ifdef CONFIG_NETKIT
9 int netkit_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
10 int netkit_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
11 int netkit_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog);
12 int netkit_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
13 INDIRECT_CALLABLE_DECLARE(struct net_device *netkit_peer_dev(struct net_device *dev));
14 #else
15 static inline int netkit_prog_attach(const union bpf_attr *attr,
16 struct bpf_prog *prog)
18 return -EINVAL;
21 static inline int netkit_link_attach(const union bpf_attr *attr,
22 struct bpf_prog *prog)
24 return -EINVAL;
27 static inline int netkit_prog_detach(const union bpf_attr *attr,
28 struct bpf_prog *prog)
30 return -EINVAL;
33 static inline int netkit_prog_query(const union bpf_attr *attr,
34 union bpf_attr __user *uattr)
36 return -EINVAL;
39 static inline struct net_device *netkit_peer_dev(struct net_device *dev)
41 return NULL;
43 #endif /* CONFIG_NETKIT */
44 #endif /* __NET_NETKIT_H */