From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yonghong Song Subject: Re: [PATCH net-next 0/3] bpf: implement bpf_get_current_cgroup_id() helper Date: Sun, 3 Jun 2018 16:03:09 -0700 Message-ID: <2630312d-d5eb-6cc1-e96b-ddb66d81c781@fb.com> References: <20180603073654.3600598-1-yhs@fb.com> <20180603195959.jvo54so66mhkpvww@ast-mbp> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , To: Alexei Starovoitov Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:41850 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbeFCXEK (ORCPT ); Sun, 3 Jun 2018 19:04:10 -0400 In-Reply-To: <20180603195959.jvo54so66mhkpvww@ast-mbp> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 6/3/18 1:00 PM, Alexei Starovoitov wrote: > On Sun, Jun 03, 2018 at 12:36:51AM -0700, Yonghong Song wrote: >> bpf has been used extensively for tracing. For example, bcc >> contains an almost full set of bpf-based tools to trace kernel >> and user functions/events. Most tracing tools are currently >> either filtered based on pid or system-wide. >> >> Containers have been used quite extensively in industry and >> cgroup is often used together to provide resource isolation >> and protection. Several processes may run inside the same >> container. It is often desirable to get container-level tracing >> results as well, e.g. syscall count, function count, I/O >> activity, etc. >> >> This patch implements a new helper, bpf_get_current_cgroup_id(), >> which will return cgroup id based on the cgroup within which >> the current task is running. >> >> Patch #1 implements the new helper in the kernel. >> Patch #2 syncs the uapi bpf.h header and helper between tools >> and kernel. >> Patch #3 shows how to get the same cgroup id in user space, >> so a filter or policy could be configgured in the bpf program >> based on current task cgroup. > > for all patches: > Acked-by: Alexei Starovoitov > > please rebase, so it can be applied and s/net-next/bpf-next/ in subj. Sorry. Missed to change subject line from "net-next" to "bpf-next". Do you want to submit another revision? > Thanks! >