aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netprio_cgroup.h
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-12-29 11:27:11 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-03 17:41:42 -0500
commit86f8515f9721fa171483f0fe0391968fbb949cc9 (patch)
treea21f4df024bc16044cb174948494180769cbcbbe /include/net/netprio_cgroup.h
parentfe1217c4f3f7d7cbf8efdd8dd5fdc7204a1d65a8 (diff)
net: netprio: rename config to be more consistent with cgroup configs
While we're at it and introduced CGROUP_NET_CLASSID, lets also make NETPRIO_CGROUP more consistent with the rest of cgroups and rename it into CONFIG_CGROUP_NET_PRIO so that for networking, we now have CONFIG_CGROUP_NET_{PRIO,CLASSID}. This not only makes the CONFIG option consistent among networking cgroups, but also among cgroups CONFIG conventions in general as the vast majority has a prefix of CONFIG_CGROUP_<SUBSYS>. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Zefan Li <lizefan@huawei.com> Cc: cgroups@vger.kernel.org Acked-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netprio_cgroup.h')
-rw-r--r--include/net/netprio_cgroup.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h
index 099d02782e22..dafc09f0fdbc 100644
--- a/include/net/netprio_cgroup.h
+++ b/include/net/netprio_cgroup.h
@@ -13,12 +13,12 @@
13 13
14#ifndef _NETPRIO_CGROUP_H 14#ifndef _NETPRIO_CGROUP_H
15#define _NETPRIO_CGROUP_H 15#define _NETPRIO_CGROUP_H
16
16#include <linux/cgroup.h> 17#include <linux/cgroup.h>
17#include <linux/hardirq.h> 18#include <linux/hardirq.h>
18#include <linux/rcupdate.h> 19#include <linux/rcupdate.h>
19 20
20 21#if IS_ENABLED(CONFIG_CGROUP_NET_PRIO)
21#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
22struct netprio_map { 22struct netprio_map {
23 struct rcu_head rcu; 23 struct rcu_head rcu;
24 u32 priomap_len; 24 u32 priomap_len;
@@ -27,8 +27,7 @@ struct netprio_map {
27 27
28void sock_update_netprioidx(struct sock *sk); 28void sock_update_netprioidx(struct sock *sk);
29 29
30#if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) 30#if IS_BUILTIN(CONFIG_CGROUP_NET_PRIO)
31
32static inline u32 task_netprioidx(struct task_struct *p) 31static inline u32 task_netprioidx(struct task_struct *p)
33{ 32{
34 struct cgroup_subsys_state *css; 33 struct cgroup_subsys_state *css;
@@ -40,9 +39,7 @@ static inline u32 task_netprioidx(struct task_struct *p)
40 rcu_read_unlock(); 39 rcu_read_unlock();
41 return idx; 40 return idx;
42} 41}
43 42#elif IS_MODULE(CONFIG_CGROUP_NET_PRIO)
44#elif IS_MODULE(CONFIG_NETPRIO_CGROUP)
45
46static inline u32 task_netprioidx(struct task_struct *p) 43static inline u32 task_netprioidx(struct task_struct *p)
47{ 44{
48 struct cgroup_subsys_state *css; 45 struct cgroup_subsys_state *css;
@@ -56,9 +53,7 @@ static inline u32 task_netprioidx(struct task_struct *p)
56 return idx; 53 return idx;
57} 54}
58#endif 55#endif
59 56#else /* !CONFIG_CGROUP_NET_PRIO */
60#else /* !CONFIG_NETPRIO_CGROUP */
61
62static inline u32 task_netprioidx(struct task_struct *p) 57static inline u32 task_netprioidx(struct task_struct *p)
63{ 58{
64 return 0; 59 return 0;
@@ -66,6 +61,5 @@ static inline u32 task_netprioidx(struct task_struct *p)
66 61
67#define sock_update_netprioidx(sk) 62#define sock_update_netprioidx(sk)
68 63
69#endif /* CONFIG_NETPRIO_CGROUP */ 64#endif /* CONFIG_CGROUP_NET_PRIO */
70
71#endif /* _NET_CLS_CGROUP_H */ 65#endif /* _NET_CLS_CGROUP_H */