cregit-Linux how code gets into the kernel

Release 4.12 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 Horman3780.43%240.00%
Tejun 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 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 Horman15100.00%2100.00%
Total15100.00%2100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo872.73%150.00%
Neil Horman327.27%150.00%
Total11100.00%2100.00%

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

Overall Contributors

PersonTokensPropCommitsCommitProp
Neil Horman9463.95%225.00%
Tejun Heo4530.61%450.00%
Daniel Wagner53.40%112.50%
Daniel 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.
Created with cregit.