Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Borkmann and committed by
Pablo Neira Ayuso
86f8515f fe1217c4

+14 -20
+1 -1
include/linux/cgroup_subsys.h
··· 43 43 SUBSYS(perf) 44 44 #endif 45 45 46 - #if IS_SUBSYS_ENABLED(CONFIG_NETPRIO_CGROUP) 46 + #if IS_SUBSYS_ENABLED(CONFIG_CGROUP_NET_PRIO) 47 47 SUBSYS(net_prio) 48 48 #endif 49 49
+1 -1
include/linux/netdevice.h
··· 1444 1444 /* max exchange id for FCoE LRO by ddp */ 1445 1445 unsigned int fcoe_ddp_xid; 1446 1446 #endif 1447 - #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) 1447 + #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 1448 1448 struct netprio_map __rcu *priomap; 1449 1449 #endif 1450 1450 /* phy device may attach itself for hardware timestamping */
+6 -12
include/net/netprio_cgroup.h
··· 13 13 14 14 #ifndef _NETPRIO_CGROUP_H 15 15 #define _NETPRIO_CGROUP_H 16 + 16 17 #include <linux/cgroup.h> 17 18 #include <linux/hardirq.h> 18 19 #include <linux/rcupdate.h> 19 20 20 - 21 - #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) 21 + #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 22 22 struct netprio_map { 23 23 struct rcu_head rcu; 24 24 u32 priomap_len; ··· 27 27 28 28 void sock_update_netprioidx(struct sock *sk); 29 29 30 - #if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) 31 - 30 + #if IS_BUILTIN(CONFIG_CGROUP_NET_PRIO) 32 31 static inline u32 task_netprioidx(struct task_struct *p) 33 32 { 34 33 struct cgroup_subsys_state *css; ··· 39 40 rcu_read_unlock(); 40 41 return idx; 41 42 } 42 - 43 - #elif IS_MODULE(CONFIG_NETPRIO_CGROUP) 44 - 43 + #elif IS_MODULE(CONFIG_CGROUP_NET_PRIO) 45 44 static inline u32 task_netprioidx(struct task_struct *p) 46 45 { 47 46 struct cgroup_subsys_state *css; ··· 53 56 return idx; 54 57 } 55 58 #endif 56 - 57 - #else /* !CONFIG_NETPRIO_CGROUP */ 58 - 59 + #else /* !CONFIG_CGROUP_NET_PRIO */ 59 60 static inline u32 task_netprioidx(struct task_struct *p) 60 61 { 61 62 return 0; ··· 61 66 62 67 #define sock_update_netprioidx(sk) 63 68 64 - #endif /* CONFIG_NETPRIO_CGROUP */ 65 - 69 + #endif /* CONFIG_CGROUP_NET_PRIO */ 66 70 #endif /* _NET_CLS_CGROUP_H */
+1 -1
include/net/sock.h
··· 395 395 unsigned short sk_ack_backlog; 396 396 unsigned short sk_max_ack_backlog; 397 397 __u32 sk_priority; 398 - #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) 398 + #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 399 399 __u32 sk_cgrp_prioidx; 400 400 #endif 401 401 struct pid *sk_peer_pid;
+2 -2
net/Kconfig
··· 238 238 depends on SMP 239 239 default y 240 240 241 - config NETPRIO_CGROUP 241 + config CGROUP_NET_PRIO 242 242 tristate "Network priority cgroup" 243 243 depends on CGROUPS 244 244 ---help--- 245 245 Cgroup subsystem for use in assigning processes to network priorities on 246 - a per-interface basis 246 + a per-interface basis. 247 247 248 248 config CGROUP_NET_CLASSID 249 249 boolean "Network classid cgroup"
+1 -1
net/core/Makefile
··· 21 21 obj-$(CONFIG_TRACEPOINTS) += net-traces.o 22 22 obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o 23 23 obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o 24 - obj-$(CONFIG_NETPRIO_CGROUP) += netprio_cgroup.o 24 + obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o 25 25 obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
+1 -1
net/core/dev.c
··· 2747 2747 return rc; 2748 2748 } 2749 2749 2750 - #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) 2750 + #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 2751 2751 static void skb_update_prio(struct sk_buff *skb) 2752 2752 { 2753 2753 struct netprio_map *map = rcu_dereference_bh(skb->dev->priomap);
+1 -1
net/core/sock.c
··· 1308 1308 module_put(owner); 1309 1309 } 1310 1310 1311 - #if IS_ENABLED(CONFIG_NETPRIO_CGROUP) 1311 + #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) 1312 1312 void sock_update_netprioidx(struct sock *sk) 1313 1313 { 1314 1314 if (in_interrupt())