2 * netprio_cgroup.h Control Group Priority set
5 * Authors: Neil Horman <nhorman@tuxdriver.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
14 #ifndef _NETPRIO_CGROUP_H
15 #define _NETPRIO_CGROUP_H
16 #include <linux/module.h>
17 #include <linux/cgroup.h>
18 #include <linux/hardirq.h>
19 #include <linux/rcupdate.h>
30 struct cgroup_netprio_state
{
31 struct cgroup_subsys_state css
;
35 #ifndef CONFIG_NETPRIO_CGROUP
36 extern int net_prio_subsys_id
;
39 extern void sock_update_netprioidx(struct sock
*sk
);
41 static inline struct cgroup_netprio_state
42 *task_netprio_state(struct task_struct
*p
)
44 #if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
45 return container_of(task_subsys_state(p
, net_prio_subsys_id
),
46 struct cgroup_netprio_state
, css
);
54 #define sock_update_netprioidx(sk)
57 #endif /* _NET_CLS_CGROUP_H */