From mboxrd@z Thu Jan 1 00:00:00 1970 From: Quentin Monnet Subject: Re: [PATCH bpf-next] bpf: change eBPF helper doc parsing script to allow for smaller indent Date: Thu, 17 May 2018 17:05:12 +0100 Message-ID: <7844f6be-0c63-4e76-21ca-54896e3aab4e@netronome.com> References: <20180517124356.1452-1-quentin.monnet@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, oss-drivers@netronome.com To: Daniel Borkmann , ast@kernel.org Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:50809 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbeEQQFP (ORCPT ); Thu, 17 May 2018 12:05:15 -0400 Received: by mail-wm0-f68.google.com with SMTP id t11-v6so9471745wmt.0 for ; Thu, 17 May 2018 09:05:14 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 2018-05-17 17:38 UTC+0200 ~ Daniel Borkmann > On 05/17/2018 02:43 PM, Quentin Monnet wrote: >> Documentation for eBPF helpers can be parsed from bpf.h and eventually >> turned into a man page. Commit 6f96674dbd8c ("bpf: relax constraints on >> formatting for eBPF helper documentation") changed the script used to >> parse it, in order to allow for different indent style and to ease the >> work for writing documentation for future helpers. >> >> The script currently considers that the first tab can be replaced by 6 >> to 8 spaces. But the documentation for bpf_fib_lookup() uses a mix of >> tabs (for the "Description" part) and of spaces ("Return" part), and >> only has 5 space long indent for the latter. >> >> We probably do not want to change the values accepted by the script each >> time a new helper gets a new indent style. However, it is worth noting >> that with those 5 spaces, the "Description" and "Return" part *look* >> aligned in the generated patch and in `git show`, so it is likely other >> helper authors will use the same length. Therefore, allow for helper >> documentation to use 5 spaces only for the first indent level. >> >> Signed-off-by: Quentin Monnet > > Applied to bpf-next, thanks Quentin! Btw in the current uapi description > some of the helpers have a new line before 'Return' and most have not. I > presume it doesn't really matter though we might want to do a one-time > cleanup on these cases at some point in time. Thanks Daniel! I did notice those new lines as well. The script was failing on the 5-space indent, but not on the new lines, so I let them as they are. I agree for the cleanup, I can send a patch when the various helpers currently being discussed on the list are merged. Best, Quentin