helpers.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | helpers.c (67c0496e87d193b8356d2af49ab95e8a1b954b3c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 3 */ 4#include <linux/bpf.h> 5#include <linux/rcupdate.h> 6#include <linux/random.h> 7#include <linux/smp.h> 8#include <linux/topology.h> --- 303 unchanged lines hidden (view full) --- 312 preempt_enable(); 313} 314 315#ifdef CONFIG_CGROUPS 316BPF_CALL_0(bpf_get_current_cgroup_id) 317{ 318 struct cgroup *cgrp = task_dfl_cgroup(current); 319 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 3 */ 4#include <linux/bpf.h> 5#include <linux/rcupdate.h> 6#include <linux/random.h> 7#include <linux/smp.h> 8#include <linux/topology.h> --- 303 unchanged lines hidden (view full) --- 312 preempt_enable(); 313} 314 315#ifdef CONFIG_CGROUPS 316BPF_CALL_0(bpf_get_current_cgroup_id) 317{ 318 struct cgroup *cgrp = task_dfl_cgroup(current); 319 |
320 return cgrp->kn->id.id; | 320 return cgrp->kn->id; |
321} 322 323const struct bpf_func_proto bpf_get_current_cgroup_id_proto = { 324 .func = bpf_get_current_cgroup_id, 325 .gpl_only = false, 326 .ret_type = RET_INTEGER, 327}; 328 --- 161 unchanged lines hidden --- | 321} 322 323const struct bpf_func_proto bpf_get_current_cgroup_id_proto = { 324 .func = bpf_get_current_cgroup_id, 325 .gpl_only = false, 326 .ret_type = RET_INTEGER, 327}; 328 --- 161 unchanged lines hidden --- |