From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbcBVPRS (ORCPT ); Mon, 22 Feb 2016 10:17:18 -0500 Received: from mail.kernel.org ([198.145.29.136]:34573 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592AbcBVPRR (ORCPT ); Mon, 22 Feb 2016 10:17:17 -0500 Date: Mon, 22 Feb 2016 12:17:10 -0300 From: Arnaldo Carvalho de Melo To: "Wangnan (F)" Cc: Alexei Starovoitov , Brendan Gregg , Adrian Hunter , Cody P Schafer , "David S. Miller" , He Kuang , =?iso-8859-1?Q?J=E9r=E9mie?= Galarneau , Jiri Olsa , Kirill Smelkov , Li Zefan , Masami Hiramatsu , Namhyung Kim , Peter Zijlstra , pi3orama@163.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/54] perf tools: Add API to config maps in bpf object Message-ID: <20160222151710.GA15684@kernel.org> References: <20160215200211.GB17690@kernel.org> <56CA8910.7000303@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56CA8910.7000303@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Feb 22, 2016 at 12:05:36PM +0800, Wangnan (F) escreveu: > > > On 2016/2/19 21:53, Arnaldo Carvalho de Melo wrote: > >Sorry for the top post, but the message below didn't made it thru due to > >local problems as I recently switched notebooks, my postfix setup barfed > >this one :-\ > > > >This is what I have in my tmp.perf/bpf_map: > > > >https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=tmp.perf/bpf_map&id=5c78fe3c5a944ba7f9a85f59548295211f3d252c > > > >Please take a look and see if you're ok with it, > > I agree your change, but the commit you mentioned has a bug > which I have already fixed in Feb. 19 patch set: > > At bpf_map__config_value: > > + if (!term->type_val == PARSE_EVENTS__TERM_TYPE_NUM) { > + pr_debug("ERROR: wrong value type\n"); > + return -BPF_LOADER_ERRNO__OBJCONF_MAP_VALUE; > + } > > Should use > > if (term->type_val != PARSE_EVENTS__TERM_TYPE_NUM) > > I'll switch 'maps' to 'map' as you did in my tree and send this > patch again. (still based on perf/core, so I can solve potential > conflicts in my side). Ok, going thru the patchkit again, noticed the only change was the above one for this patch, thanks: uet linux]$ interdiff /wb/1.patch /tmp/acme.patch diff -u b/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c --- b/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c @@ -897,7 +897,7 @@ return -BPF_LOADER_ERRNO__OBJCONF_CONF; } - if (term->type_val != PARSE_EVENTS__TERM_TYPE_NUM) { + if (!term->type_val == PARSE_EVENTS__TERM_TYPE_NUM) { pr_debug("ERROR: wrong value type\n"); return -BPF_LOADER_ERRNO__OBJCONF_MAP_VALUE; } [acme@jouet linux]$