Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbbK1BWi (ORCPT ); Fri, 27 Nov 2015 20:22:38 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:35539 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbbK1BWf (ORCPT ); Fri, 27 Nov 2015 20:22:35 -0500 Message-ID: <56590194.7030406@huawei.com> Date: Sat, 28 Nov 2015 09:21:24 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo CC: Alexei Starovoitov , , Adrian Hunter , Peter Zijlstra , David Ahern , Ingo Molnar , Jiri Olsa , Namhyung Kim , Masami Hiramatsu , Brendan Gregg , , , He Kuang Subject: Re: RFC Re: [PATCH v2 04/13] perf tools: Add API to config maps in bpf object References: <1448614067-197576-1-git-send-email-wangnan0@huawei.com> <1448614067-197576-5-git-send-email-wangnan0@huawei.com> <20151128011054.GM5934@kernel.org> <5659015A.7080901@huawei.com> In-Reply-To: <5659015A.7080901@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.5659019C.008E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 21b9ae3731d19c854d025cc8c9b24d0d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1656 Lines: 63 On 2015/11/28 9:20, Wangnan (F) wrote: > > > On 2015/11/28 9:10, Arnaldo Carvalho de Melo wrote: >> Em Fri, Nov 27, 2015 at 08:47:38AM +0000, Wang Nan escreveu: >>> bpf__config_obj() is introduced as a core API to config BPF object >>> after loading. One configuration option of maps is introduced. After >>> this patch BPF object can accept configuration like: >>> >>> maps:my_map:value=1234 >>> >>> (maps.my_map.value looks pretty. However, there's a small but hard >>> to fixed problem related to flex's greedy matching. Please see [1]. >>> Choose ':' to avoid it in a simpler way.) >> Understood the issues, but I would like to hear from Ingo, Jiri, >> Namhyung, Brian and others here, since we're setting up syntax, and yes, >> using: >> maps.my_map.value[0,3...6]=1234; >> >> or even: >> >> maps->my_map->value[0,3...6]=1234; >> >> Looks more natural than: >> >> maps:my_map:value[0,3...6]=1234; > > You don't mention maps::my_map::value. C++ use '::' this way, so I think > it is also a possible choice. > > Or we can use another character for example '|' to replace '/' in case we > have a map starting with 'c' or 'o'. For example: > > ./mybpf.c|maps.channel.value=1234| > > and in normal case still support '/': > > ./mybpf.c/maps.channel.value=1234/ Should be: ./mybpf.c/maps.mymap.value=1234/ > > like 'sed': > > # sed 's/a/b/g' > a > b > # sed 's+/+|+g' > / > | > > Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/