cls_cgroup.h (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | cls_cgroup.h (5a52ae4e32a61ad06ef67f0b3123adbdbac4fb83) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * cls_cgroup.h Control Group Classifier 4 * 5 * Authors: Thomas Graf <tgraf@suug.ch> 6 */ 7 8#ifndef _NET_CLS_CGROUP_H --- 31 unchanged lines hidden (view full) --- 40static inline void sock_update_classid(struct sock_cgroup_data *skcd) 41{ 42 u32 classid; 43 44 classid = task_cls_classid(current); 45 sock_cgroup_set_classid(skcd, classid); 46} 47 | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * cls_cgroup.h Control Group Classifier 4 * 5 * Authors: Thomas Graf <tgraf@suug.ch> 6 */ 7 8#ifndef _NET_CLS_CGROUP_H --- 31 unchanged lines hidden (view full) --- 40static inline void sock_update_classid(struct sock_cgroup_data *skcd) 41{ 42 u32 classid; 43 44 classid = task_cls_classid(current); 45 sock_cgroup_set_classid(skcd, classid); 46} 47 |
48static inline u32 __task_get_classid(struct task_struct *task) 49{ 50 return task_cls_state(task)->classid; 51} 52 |
|
48static inline u32 task_get_classid(const struct sk_buff *skb) 49{ | 53static inline u32 task_get_classid(const struct sk_buff *skb) 54{ |
50 u32 classid = task_cls_state(current)->classid; | 55 u32 classid = __task_get_classid(current); |
51 52 /* Due to the nature of the classifier it is required to ignore all 53 * packets originating from softirq context as accessing `current' 54 * would lead to false results. 55 * 56 * This test assumes that all callers of dev_queue_xmit() explicitly 57 * disable bh. Knowing this, it is possible to detect softirq based 58 * calls by looking at the number of nested bh disable calls because --- 25 unchanged lines hidden --- | 56 57 /* Due to the nature of the classifier it is required to ignore all 58 * packets originating from softirq context as accessing `current' 59 * would lead to false results. 60 * 61 * This test assumes that all callers of dev_queue_xmit() explicitly 62 * disable bh. Knowing this, it is possible to detect softirq based 63 * calls by looking at the number of nested bh disable calls because --- 25 unchanged lines hidden --- |