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=-3.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT 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 8749EC282D7 for ; Sat, 2 Feb 2019 16:52:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CCAB2085A for ; Sat, 2 Feb 2019 16:52:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VzV87vHv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726331AbfBBQwe (ORCPT ); Sat, 2 Feb 2019 11:52:34 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44425 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbfBBQwd (ORCPT ); Sat, 2 Feb 2019 11:52:33 -0500 Received: by mail-pf1-f196.google.com with SMTP id u6so4800308pfh.11 for ; Sat, 02 Feb 2019 08:52:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K7Mr+bENrTEl8R+P25BlRpLeCkBPkUgV/Kvge8QDD5c=; b=VzV87vHvmh94wUL2Ngy2Hm3oYx4LJH411xfGhpLMdX+i0xRNW7782He+U3cP3CkcGu 3nUCtGLoJij9UFe5uYC7230X48OMEgbXpQ9iTfhvxGHWkxVrOeEH6SkPgyUREM4HjWG4 Ejrkf3Xm2kqhc6jjF+eu2PiUHXJ1oufVATRpcDhGG0mflUqDKX0Zfra1ehQlllSWLMdR OeWrE+LWI8au2TaqlP/ybFwY/fPkU4VBEBOsbLuAGA5vaDUqY8TEXvO5qioRCnYmXAi8 fXx9/lKddlJb1iq0CvONcU9+WbCWJjg0Ytk9KlZRJwqIk7O1l1mxaYnLnGX+9HLZPFh3 IZyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K7Mr+bENrTEl8R+P25BlRpLeCkBPkUgV/Kvge8QDD5c=; b=PfpYs57USB71CRvHJDNwL5qZpgVWq2BYxy+nz+NW9I4SVqNm5AFVdk5i2sTt5h/EN6 yCTIkiuyz+R+PYPoxmRDoeBWuH0oFJgihyAP2EwpKzvW3PZS4JoPH/R3QxG4He0ccMUT Fz4nqyfwDp3n+1bW9qlZw/gYmBviJP7P5wX0cBpqrgIeALeFE+t7xZI1Ec0FDOwXYDA4 Cm9VW7gaJz0iBfjGA6xg0NIXxmVBPxyYcjtUFfv7sX+pjMF0iTdpiuJOw7E+FCE4WTOA gVo7yHj1C1nyD8xv19c7erZoozpzxMfcxBQfQvME52oI8BOpDr9unfLAM9pEqHhzOpTj SQaA== X-Gm-Message-State: AHQUAuY3Wxp+L+rKEgy7gJkvVacOT7pCjJ9L8r8+mVU92QrmbDIeLxlC xBYcuAR6GUKCJWsgEC1fJUs= X-Google-Smtp-Source: AHgI3IYmjZAdnSJC0VppbARxtt/SThx0oUZUPgwlPHdOnJL1+8BeYUFecMg+/avoBte06kBFvid/oQ== X-Received: by 2002:a63:8149:: with SMTP id t70mr6834687pgd.172.1549126352570; Sat, 02 Feb 2019 08:52:32 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::1:20ba]) by smtp.gmail.com with ESMTPSA id i8sm2066987pfj.18.2019.02.02.08.52.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Feb 2019 08:52:31 -0800 (PST) Date: Sat, 2 Feb 2019 08:52:30 -0800 From: Alexei Starovoitov To: Yonghong Song Cc: Arnaldo Carvalho de Melo , Magnus Karlsson , netdev@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , kernel-team@fb.com Subject: Re: [PATCH bpf-next v4 0/3] tools/bpf: changes of libbpf debug interfaces Message-ID: <20190202165228.jrcghbvro4st4thd@ast-mbp> References: <20190202001413.3178000-1-yhs@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190202001413.3178000-1-yhs@fb.com> User-Agent: NeoMutt/20180223 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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?