Received: by 10.213.65.68 with SMTP id h4csp1411985imn; Wed, 21 Mar 2018 10:02:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELt6h49l/f5m4qWvwgTWwmiTokXRx9emrDZnJnVOOqaO5Q6+M2Y6PqRKAfMySmv5J4LZJbjR X-Received: by 10.98.211.211 with SMTP id z80mr17170053pfk.16.1521651721507; Wed, 21 Mar 2018 10:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521651721; cv=none; d=google.com; s=arc-20160816; b=1HHHQYu0LKJjwOFDGxCT8UDONZN9rI7UZ4UEQMjacQx8wm3HFh3TCb3fi0AksFzYg6 oaZdK3F04tR3H0OlgCRkJZUbKtstjsVE96mD5rjJ3ScaKEKeqNrpyf8vXXmfqaq64Y2/ L96hi6FqxoZizhTICE1f0Wax9Ur5/aYJs91TIq2XAS6egauWyqsBVGpqp2EP/XeE502d Ko0CtVUtGfO3F/JJrrLJbooq1bKpqQ/MraeK6fI6eQ5Wjo06GUlghUtBG2GDThXraIbz BweOfKgc/ukJZLK+n8oElPXHuNWMhU9T7hsC/tnxKqCDAP/2MRE4rhCMJdwh7amCAN5Y TOfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YPvO+ws+xIIVvlW/tvylOjH7iQ4ee7j5fkvHn+C1+bQ=; b=XqxdxJgGQM6oaHU/8lg8gs/0jm/xlILjFE2/2z5YEtSafqR7am0EuBjQN3f82h8CB1 5PxMWF2YpReL1LmRzPvZHNty0jyeT3nOZ/rbKWCly/iE4PgRjaYqQr6M/H+/YnkrQyaB d83ia0P6MCsDdkQ9HZlfFAC/gW3TY5LLuQ2QJgN97iyDHPU4fRBXbCP5im7XW7m+BCsw nXXlhpFRYwaSHZqvPTDM0fxFvphJSCn6Omty2VJutrOMcgIr2Hdfyy9Jo+SjSiBVwTD1 KH+P4eNi8jdAWMXBPSRXOo6vC3bqQE8QdhX+WL5xDzRKlvX9rZ8O8D6jlnsTE96MGKQD Wzcw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73-v6si4375045plh.393.2018.03.21.10.01.43; Wed, 21 Mar 2018 10:02:01 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbeCURAY (ORCPT + 99 others); Wed, 21 Mar 2018 13:00:24 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54282 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751644AbeCURAV (ORCPT ); Wed, 21 Mar 2018 13:00:21 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8AA4B4022909; Wed, 21 Mar 2018 17:00:20 +0000 (UTC) Received: from krava (unknown [10.43.17.150]) by smtp.corp.redhat.com (Postfix) with SMTP id 910089C070; Wed, 21 Mar 2018 17:00:19 +0000 (UTC) Date: Wed, 21 Mar 2018 18:00:19 +0100 From: Jiri Olsa To: Daniel Borkmann Cc: Quentin Monnet , Jiri Olsa , Alexei Starovoitov , lkml , netdev@vger.kernel.org Subject: [PATCHv2 2/2] bpftool: Adjust to new print_bpf_insn interface Message-ID: <20180321170019.GE2707@krava> References: <20180321150212.5586-1-jolsa@kernel.org> <20180321150212.5586-2-jolsa@kernel.org> <20180321164324.GD2707@krava> <774f0eca-72cf-1c70-e025-beea2084ebe0@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <774f0eca-72cf-1c70-e025-beea2084ebe0@iogearbox.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 21 Mar 2018 17:00:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 21 Mar 2018 17:00:20 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 21, 2018 at 05:44:52PM +0100, Daniel Borkmann wrote: SNIP > >> Hi Jiri, this code has changed in the tree. It was moved to > >> tools/bpf/bpftool/xlated_dumper.c, and there is now a third function to > >> update: print_insn_for_graph(). Could you please rebase the patch? > > > > sure.. I was over perf tree, I'll check on bpf tree > > Just to be sure, it should be bpf-next. bpf is for fixes only. v2 attached thanks, jirka --- Change bpftool to skip the removed struct bpf_verifier_env argument in print_bpf_insn. It was passed as NULL anyway. No functional change intended. Signed-off-by: Jiri Olsa --- tools/bpf/bpftool/xlated_dumper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/bpf/bpftool/xlated_dumper.c b/tools/bpf/bpftool/xlated_dumper.c index 20da835e9e38..7a3173b76c16 100644 --- a/tools/bpf/bpftool/xlated_dumper.c +++ b/tools/bpf/bpftool/xlated_dumper.c @@ -114,7 +114,7 @@ static struct kernel_sym *kernel_syms_search(struct dump_data *dd, sizeof(*dd->sym_mapping), kernel_syms_cmp) : NULL; } -static void print_insn(struct bpf_verifier_env *env, const char *fmt, ...) +static void print_insn(void *private_data, const char *fmt, ...) { va_list args; @@ -124,7 +124,7 @@ static void print_insn(struct bpf_verifier_env *env, const char *fmt, ...) } static void -print_insn_for_graph(struct bpf_verifier_env *env, const char *fmt, ...) +print_insn_for_graph(void *private_data, const char *fmt, ...) { char buf[64], *p; va_list args; @@ -154,7 +154,7 @@ print_insn_for_graph(struct bpf_verifier_env *env, const char *fmt, ...) printf("%s", buf); } -static void print_insn_json(struct bpf_verifier_env *env, const char *fmt, ...) +static void print_insn_json(void *private_data, const char *fmt, ...) { unsigned int l = strlen(fmt); char chomped_fmt[l]; @@ -248,7 +248,7 @@ void dump_xlated_json(struct dump_data *dd, void *buf, unsigned int len, jsonw_start_object(json_wtr); jsonw_name(json_wtr, "disasm"); - print_bpf_insn(&cbs, NULL, insn + i, true); + print_bpf_insn(&cbs, insn + i, true); if (opcodes) { jsonw_name(json_wtr, "opcodes"); @@ -302,7 +302,7 @@ void dump_xlated_plain(struct dump_data *dd, void *buf, unsigned int len, double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW); printf("% 4d: ", i); - print_bpf_insn(&cbs, NULL, insn + i, true); + print_bpf_insn(&cbs, insn + i, true); if (opcodes) { printf(" "); @@ -331,7 +331,7 @@ void dump_xlated_for_graph(struct dump_data *dd, void *buf_start, void *buf_end, for (; cur <= insn_end; cur++) { printf("% 4d: ", (int)(cur - insn_start + start_idx)); - print_bpf_insn(&cbs, NULL, cur, true); + print_bpf_insn(&cbs, cur, true); if (cur != insn_end) printf(" | "); } -- 2.13.6