|
@@ -18,14 +18,13 @@
|
|
#include <linux/rcupdate.h>
|
|
#include <linux/rcupdate.h>
|
|
|
|
|
|
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
|
|
struct netprio_map {
|
|
struct netprio_map {
|
|
struct rcu_head rcu;
|
|
struct rcu_head rcu;
|
|
u32 priomap_len;
|
|
u32 priomap_len;
|
|
u32 priomap[];
|
|
u32 priomap[];
|
|
};
|
|
};
|
|
|
|
|
|
-#ifdef CONFIG_CGROUPS
|
|
|
|
-
|
|
|
|
struct cgroup_netprio_state {
|
|
struct cgroup_netprio_state {
|
|
struct cgroup_subsys_state css;
|
|
struct cgroup_subsys_state css;
|
|
u32 prioidx;
|
|
u32 prioidx;
|
|
@@ -71,18 +70,17 @@ static inline u32 task_netprioidx(struct task_struct *p)
|
|
rcu_read_unlock();
|
|
rcu_read_unlock();
|
|
return idx;
|
|
return idx;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
-#else
|
|
|
|
|
|
+#else /* !CONFIG_NETPRIO_CGROUP */
|
|
|
|
|
|
static inline u32 task_netprioidx(struct task_struct *p)
|
|
static inline u32 task_netprioidx(struct task_struct *p)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-#endif /* CONFIG_NETPRIO_CGROUP */
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
#define sock_update_netprioidx(sk, task)
|
|
#define sock_update_netprioidx(sk, task)
|
|
-#endif
|
|
|
|
|
|
+
|
|
|
|
+#endif /* CONFIG_NETPRIO_CGROUP */
|
|
|
|
|
|
#endif /* _NET_CLS_CGROUP_H */
|
|
#endif /* _NET_CLS_CGROUP_H */
|