| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * cls_cgroup.h Control Group Classifier |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Authors: Thomas Graf <tgraf@suug.ch> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms of the GNU General Public License as published by the Free |
|---|
| 8 | | - * Software Foundation; either version 2 of the License, or (at your option) |
|---|
| 9 | | - * any later version. |
|---|
| 10 | | - * |
|---|
| 11 | 6 | */ |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | #ifndef _NET_CLS_CGROUP_H |
|---|
| .. | .. |
|---|
| 50 | 45 | sock_cgroup_set_classid(skcd, classid); |
|---|
| 51 | 46 | } |
|---|
| 52 | 47 | |
|---|
| 48 | +static inline u32 __task_get_classid(struct task_struct *task) |
|---|
| 49 | +{ |
|---|
| 50 | + return task_cls_state(task)->classid; |
|---|
| 51 | +} |
|---|
| 52 | + |
|---|
| 53 | 53 | static inline u32 task_get_classid(const struct sk_buff *skb) |
|---|
| 54 | 54 | { |
|---|
| 55 | | - u32 classid = task_cls_state(current)->classid; |
|---|
| 55 | + u32 classid = __task_get_classid(current); |
|---|
| 56 | 56 | |
|---|
| 57 | 57 | /* Due to the nature of the classifier it is required to ignore all |
|---|
| 58 | 58 | * packets originating from softirq context as accessing `current' |
|---|