From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EAC5C282C4 for ; Mon, 4 Feb 2019 14:51:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBA2C2087C for ; Mon, 4 Feb 2019 14:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730713AbfBDOv1 (ORCPT ); Mon, 4 Feb 2019 09:51:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37882 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730562AbfBDOv1 (ORCPT ); Mon, 4 Feb 2019 09:51:27 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87A73C0BEAA3; Mon, 4 Feb 2019 14:51:26 +0000 (UTC) Received: from sandy.ghostprotocols.net (ovpn-112-22.phx2.redhat.com [10.3.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B2B5B9006F; Mon, 4 Feb 2019 14:51:25 +0000 (UTC) Received: by sandy.ghostprotocols.net (Postfix, from userid 1000) id 9F5714D17; Mon, 4 Feb 2019 12:51:34 -0200 (BRST) Date: Mon, 4 Feb 2019 12:51:34 -0200 From: Arnaldo Carvalho de Melo To: Yonghong Song Cc: Alexei Starovoitov , Magnus Karlsson , netdev@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , kernel-team@fb.com, Arnaldo Carvalho de Melo Subject: Re: [PATCH bpf-next v4 0/3] tools/bpf: changes of libbpf debug interfaces Message-ID: <20190204145134.GA4290@redhat.com> References: <20190202001413.3178000-1-yhs@fb.com> <20190202165228.jrcghbvro4st4thd@ast-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190202165228.jrcghbvro4st4thd@ast-mbp> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 04 Feb 2019 14:51:27 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Em Sat, Feb 02, 2019 at 08:52:30AM -0800, Alexei Starovoitov escreveu: > On Fri, Feb 01, 2019 at 04:14:13PM -0800, Yonghong Song wrote: > > These are patches responding to my comments for > > Magnus's patch (https://patchwork.ozlabs.org/patch/1032848/). > > The goal is to make pr_* macros available to other C files > > than libbpf.c, and to simplify API function libbpf_set_print(). > > > > Specifically, Patch #1 used global functions > > to facilitate pr_* macros in the header files so they > > are available in different C files. > > Patch #2 removes the global function libbpf_print_level_available() > > which is added in Patch 1. > > Patch #3 simplified libbpf_set_print() which takes only one print > > function with a debug level argument among others. > > > > Changelogs: > > v3 -> v4: > > . rename libbpf internal header util.h to libbpf_util.h > > . rename libbpf internal function libbpf_debug_print() to libbpf_print() > > v2 -> v3: > > . bailed out earlier in libbpf_debug_print() if __libbpf_pr is NULL > > . added missing LIBBPF_DEBUG level check in libbpf.c __base_pr(). > > v1 -> v2: > > . Renamed global function libbpf_dprint() to libbpf_debug_print() > > to be more expressive. > > . Removed libbpf_dprint_level_available() as it is used only > > once in btf.c and we can remove it by optimizing for common cases. > > > > Yonghong Song (3): > > tools/bpf: move libbpf pr_* debug print functions to headers > > tools/bpf: print out btf log at LIBBPF_WARN level > > tools/bpf: simplify libbpf API function libbpf_set_print() > > > > tools/lib/bpf/btf.c | 110 +++++++++--------- > > tools/lib/bpf/btf.h | 7 +- > > tools/lib/bpf/libbpf.c | 47 ++++---- > > tools/lib/bpf/libbpf.h | 20 ++-- > > tools/lib/bpf/libbpf_util.h | 30 +++++ > > tools/lib/bpf/test_libbpf.cpp | 4 +- > > tools/perf/util/bpf-loader.c | 32 ++--- > > Overall looks good to me. > Arnaldo, could you ack the set, so we can take it into bpf-next? LGTM Acked-by: Arnaldo Carvalho de Melo - Arnaldo