From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH v8 tip 3/9] tracing: attach BPF programs to kprobes Date: Fri, 20 Mar 2015 14:38:40 -0700 Message-ID: <550C9360.7060207@plumgrid.com> References: <1426816787-5001-1-git-send-email-ast@plumgrid.com> <1426816787-5001-4-git-send-email-ast@plumgrid.com> <20150320170907.388d8c33@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150320170907.388d8c33-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Steven Rostedt Cc: Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , "David S. Miller" , Daniel Borkmann , Peter Zijlstra , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On 3/20/15 2:09 PM, Steven Rostedt wrote: > >> +/** >> + * trace_call_bpf - invoke BPF program >> + * @prog - BPF program >> + * @ctx - opaque context pointer >> + * >> + * kprobe handlers execute BPF programs via this helper. >> + * Can be used from static tracepoints in the future. > > Should also state what the expected return values are. What does a > return of "1" mean? In earlier versions of this set I had detailed description of return values from bpf program, somehow it got lost after all the revisions. Will re-add. > You are no longer in the net/ world. The rest of the Linux coding style > is: > > /* > * multi line comments > */ > > Only DaveM gets away with that format ;-) :) since bpf was born in the net/ world all comments are in that style. When it moved into kernel/bpf/ we've decided to keep net/ style in there as well, but for this file I don't mind using !net style ;) > Reviewed-by: Steven Rostedt Thanks a lot. Will respin. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751960AbbCTVip (ORCPT ); Fri, 20 Mar 2015 17:38:45 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35216 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbbCTVin (ORCPT ); Fri, 20 Mar 2015 17:38:43 -0400 Message-ID: <550C9360.7060207@plumgrid.com> Date: Fri, 20 Mar 2015 14:38:40 -0700 From: Alexei Starovoitov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Steven Rostedt CC: Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , "David S. Miller" , Daniel Borkmann , Peter Zijlstra , linux-api@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 tip 3/9] tracing: attach BPF programs to kprobes References: <1426816787-5001-1-git-send-email-ast@plumgrid.com> <1426816787-5001-4-git-send-email-ast@plumgrid.com> <20150320170907.388d8c33@gandalf.local.home> In-Reply-To: <20150320170907.388d8c33@gandalf.local.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/20/15 2:09 PM, Steven Rostedt wrote: > >> +/** >> + * trace_call_bpf - invoke BPF program >> + * @prog - BPF program >> + * @ctx - opaque context pointer >> + * >> + * kprobe handlers execute BPF programs via this helper. >> + * Can be used from static tracepoints in the future. > > Should also state what the expected return values are. What does a > return of "1" mean? In earlier versions of this set I had detailed description of return values from bpf program, somehow it got lost after all the revisions. Will re-add. > You are no longer in the net/ world. The rest of the Linux coding style > is: > > /* > * multi line comments > */ > > Only DaveM gets away with that format ;-) :) since bpf was born in the net/ world all comments are in that style. When it moved into kernel/bpf/ we've decided to keep net/ style in there as well, but for this file I don't mind using !net style ;) > Reviewed-by: Steven Rostedt Thanks a lot. Will respin.