From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbdAWBMy (ORCPT ); Sun, 22 Jan 2017 20:12:54 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49062 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdAWBMw (ORCPT ); Sun, 22 Jan 2017 20:12:52 -0500 X-Originating-IP: 209.85.216.175 MIME-Version: 1.0 In-Reply-To: <1c796689-f91a-c110-b8b2-f28132959aeb@huawei.com> References: <20170118235724.26103-1-joe@ovn.org> <1c796689-f91a-c110-b8b2-f28132959aeb@huawei.com> From: Joe Stringer Date: Sun, 22 Jan 2017 17:12:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH perf/core 0/6] Libbpf improvements To: "Wangnan (F)" Cc: LKML , ast@fb.com, Daniel Borkmann , Arnaldo Carvalho de Melo Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 January 2017 at 02:24, Wangnan (F) wrote: > > > On 2017/1/19 7:57, Joe Stringer wrote: >> >> Patch 1 fixes an issue when using drastically different BPF map >> definitions >> inside ELFs from a client using libbpf, vs the map definition libbpf uses. >> >> Patch 2 is a trivial typo fix. >> >> Patches 3-5 add some simple, useful helper functions for setting prog type >> and retrieving libbpf errors without depending on kernel headers from >> userspace programs. >> >> Patch 6 adds a new pinning functionality for an entire object. Calling >> bpf_object__pin(obj, subpath) will mount all programs from the BPF object >> to $bpf_fs_path/$subpath/progs/$progname, and all maps from the BPF object >> to $bpf_fs_path/$subpath/maps/$mapname. The first program with a >> particular >> name will be mounted with its progname and the suffix "_0"; subsequent >> programs with the same will have "_1", and so on; duplicate maps with the >> same name are disallowed. >> >> Joe Stringer (6): >> tools lib bpf: Fix map offsets in relocation >> tools lib bpf: Fix grammar in map_idx warning >> tools lib bpf: Define prog_type fns with macro >> tools lib bpf: Add set/is helpers for all prog types >> tools lib bpf: Add libbpf_get_error() >> tools lib bpf: Add bpf_object__pin() >> >> tools/lib/bpf/libbpf.c | 197 >> +++++++++++++++++++++++++++++++++++++++++------- >> tools/lib/bpf/libbpf.h | 15 +++- >> tools/perf/tests/llvm.c | 2 +- >> 3 files changed, 185 insertions(+), 29 deletions(-) >> > For patch 3,4 and 5: > > Acked-by: Wang Nan > > See my comment to commits 1, 2 and 6. Thanks for the review, I addressed your comments and sent a v2 series.