cregit-Linux how code gets into the kernel

Release 4.7 include/net/netprio_cgroup.h

Directory: include/net
/*
 * netprio_cgroup.h                     Control Group Priority set
 *
 *
 * Authors:     Neil Horman <nhorman@tuxdriver.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 */

#ifndef _NETPRIO_CGROUP_H

#define _NETPRIO_CGROUP_H

#include <linux/cgroup.h>
#include <linux/hardirq.h>
#include <linux/rcupdate.h>

#if IS_ENABLED(CONFIG_CGROUP_NET_PRIO)

struct netprio_map {
	
struct rcu_head rcu;
	
u32 priomap_len;
	
u32 priomap[];
};


static inline u32 task_netprioidx(struct task_struct *p) { struct cgroup_subsys_state *css; u32 idx; rcu_read_lock(); css = task_css(p, net_prio_cgrp_id); idx = css->cgroup->id; rcu_read_unlock(); return idx; }

Contributors

PersonTokensPropCommitsCommitProp
neil hormanneil horman3780.43%240.00%
tejun heotejun heo919.57%360.00%
Total46100.00%5100.00%


static inline void sock_update_netprioidx(struct sock_cgroup_data *skcd) { if (in_interrupt()) return; sock_cgroup_set_prioidx(skcd, task_netprioidx(current)); }

Contributors

PersonTokensPropCommitsCommitProp
tejun heotejun heo28100.00%1100.00%
Total28100.00%1100.00%

#else /* !CONFIG_CGROUP_NET_PRIO */
static inline u32 task_netprioidx(struct task_struct *p) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
neil hormanneil horman15100.00%2100.00%
Total15100.00%2100.00%


static inline void sock_update_netprioidx(struct sock_cgroup_data *skcd) { }

Contributors

PersonTokensPropCommitsCommitProp
tejun heotejun heo872.73%150.00%
neil hormanneil horman327.27%150.00%
Total11100.00%2100.00%

#endif /* CONFIG_CGROUP_NET_PRIO */ #endif /* _NET_CLS_CGROUP_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
neil hormanneil horman9463.95%225.00%
tejun heotejun heo4530.61%450.00%
daniel wagnerdaniel wagner53.40%112.50%
daniel borkmanndaniel borkmann32.04%112.50%
Total147100.00%8100.00%
Directory: include/net
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}