Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6157462ybv; Tue, 18 Feb 2020 11:03:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxvwvJFZRKMijmE0JJee4CnI3DsQG8qGvNZ6SDNAsTTZk6od57DUDYommIxKw9KKYirQpJS X-Received: by 2002:aca:2210:: with SMTP id b16mr2132068oic.32.1582052586236; Tue, 18 Feb 2020 11:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582052586; cv=none; d=google.com; s=arc-20160816; b=nGuS5T68saVCqS3Rm54f/YBHnIVyd5R5QuJYSacaYeCpYFhbUSXStZnTaK5sZW9ulb QnhG0+wrHuZaz90Qg9nRtahdqq6aHt8VD04KT5gQiIIIiI7G7QxdyJBQqypV9y/BxQEq cnljljcMBI1ysJe8vRI5+8Pve4SJnIX4rBcb21Tm0EZtFL5Uv9RLVCPP0tMc4KH4OA3S jiioSVWL2UfFvOTK9uEx8pxFcfNUUuzHY0eii4BNv38dOBcxGOULQZY84QyvtHz2bpu2 dOI4/J7LPKk7UxWi36q4ItL8eGmToMQgbDguhaF9jE7nCHt+mD7rbTIijuV9A4vJpIOz I5bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FDPZt8HzGzdtzV1eiaeI0kWgJzydfzl7LQawwweYbrw=; b=opuU3mI9CWbWmmOWYwGnDn3Jvfg8F/X8WzxMQPqXPf5tF/VCjt67ToDS9D5ivWep6f Mg07PxWZYiJJDd9ppI5xxhLGzhRxjstvEJv1FVRlQoawUviCbR5gWkQlG7rYL50kgHRr x18lgNWT9kkq12Sv7qaSPZHgzXE9oe+y9KrVhR7PhqZSLCn6X9RgPlqQix/x+h+4uIpB 7zK7Gf6V+UJpueXoIv/L8BVohhdQcu+h6i1bmOHtvSD2MFp/DN/eWebLiiLmg84xv1Lw mUvUiqiPLaE05uCmgUQIIwfT7o63Bt28AR2uLTacQyDP87m2HcTsmNn+aUjuESfcmazs HY0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si7706875oia.253.2020.02.18.11.02.53; Tue, 18 Feb 2020 11:03:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbgBRTCn (ORCPT + 99 others); Tue, 18 Feb 2020 14:02:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:35632 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbgBRTCl (ORCPT ); Tue, 18 Feb 2020 14:02:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7DD7BAD4F; Tue, 18 Feb 2020 19:02:38 +0000 (UTC) From: Michal Rostecki To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 4/6] bpftool: Update documentation of "bpftool feature" command Date: Tue, 18 Feb 2020 20:02:21 +0100 Message-Id: <20200218190224.22508-5-mrostecki@opensuse.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218190224.22508-1-mrostecki@opensuse.org> References: <20200218190224.22508-1-mrostecki@opensuse.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update documentation of "bpftool feature" command with information about new arguments: "section", "filter_in" and "filter_out". Signed-off-by: Michal Rostecki --- .../bpftool/Documentation/bpftool-feature.rst | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/tools/bpf/bpftool/Documentation/bpftool-feature.rst b/tools/bpf/bpftool/Documentation/bpftool-feature.rst index 4d08f35034a2..39b4c47e3c75 100644 --- a/tools/bpf/bpftool/Documentation/bpftool-feature.rst +++ b/tools/bpf/bpftool/Documentation/bpftool-feature.rst @@ -19,19 +19,45 @@ SYNOPSIS FEATURE COMMANDS ================ -| **bpftool** **feature probe** [*COMPONENT*] [**macros** [**prefix** *PREFIX*]] +| **bpftool** **feature probe** [*COMPONENT*] [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]] | **bpftool** **feature help** | | *COMPONENT* := { **kernel** | **dev** *NAME* } +| *SECTION* := { **system_config** | **syscall_config** | **program_types** | **map_types** | **helpers** | **misc** } DESCRIPTION =========== - **bpftool feature probe** [**kernel**] [**macros** [**prefix** *PREFIX*]] + **bpftool feature probe** [**kernel**] [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]] Probe the running kernel and dump a number of eBPF-related parameters, such as availability of the **bpf()** system call, JIT status, eBPF program types availability, eBPF helper functions availability, and more. + If the **section** keyword is passed, only the specified + probes section will be checked and printed. The only probe + which is always going to be performed is **syscall_config**, + but if the other section was provided as an argument, + **syscall_config** check will perform silently without + printing the result and bpftool will exit if the **bpf()** + syscall is not available (because in that case performing + other checks relying on the **bpf()** system call does not + make sense). + + If the **filter_in** keyword is passed, only checks with + names matching the given *PATTERN* are going the be printed + and performed. + + If the **filter_out** keyword is passed, checks with names + matching the given *PATTERN* are not going to be printed and + performed. + + Please refer to the **regex**\ (7) man page for details on + the syntax for *PATTERN*. + + **filter_in** is executed before **filter_out** which means + that **filter_out** is always applied only on probes + selected by **filter_in** if both arguments are used together. + If the **macros** keyword (but not the **-j** option) is passed, a subset of the output is dumped as a list of **#define** macros that are ready to be included in a C @@ -48,12 +74,13 @@ DESCRIPTION **bpf_trace_printk**\ () or **bpf_probe_write_user**\ ()) may print warnings to kernel logs. - **bpftool feature probe dev** *NAME* [**macros** [**prefix** *PREFIX*]] + **bpftool feature probe dev** *NAME* [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]] Probe network device for supported eBPF features and dump results to the console. - The two keywords **macros** and **prefix** have the same - role as when probing the kernel. + The keywords **section**, **filter_in**, **filter_out**, + **macros** and **prefix** have the same role as when probing + the kernel. **bpftool feature help** Print short help message. -- 2.25.0