Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbdLBBQB (ORCPT ); Fri, 1 Dec 2017 20:16:01 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:42404 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbdLBBP6 (ORCPT ); Fri, 1 Dec 2017 20:15:58 -0500 Subject: Re: [PATCH/RFC] Re: 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name" To: Arnaldo Carvalho de Melo References: <20171128190519.GM3298@kernel.org> <20171129210734.lqs23q65ac6avlwr@kafai-mbp> <20171129211543.GC31403@kernel.org> <20171129223135.6iqvj6ho4ojxmhu6@kafai-mbp> <20171130030110.GA18880@kernel.org> <20171130165358.GN3298@kernel.org> <20171130182807.sjhapvmnimtlsmpo@kafai-mbp.dhcp.thefacebook.com> <20171130190042.GQ3298@kernel.org> <312f7691-cb7a-5c2f-18c6-ab26cfaa26a6@fb.com> <20171201175106.GH3298@kernel.org> CC: Martin KaFai Lau , Wang Nan , Daniel Borkmann , "David S. Miller" , David Ahern , Ingo Molnar , Linux Kernel Mailing List , netdev From: Alexei Starovoitov Message-ID: <31839372-05b5-3704-4e04-96ff810c1327@fb.com> Date: Fri, 1 Dec 2017 17:15:07 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171201175106.GH3298@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:3d1c] X-ClientProxiedBy: MWHPR1201CA0004.namprd12.prod.outlook.com (2603:10b6:301:4a::14) To SN2PR15MB0974.namprd15.prod.outlook.com (2603:10b6:804:20::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ae91867-e6c2-42d0-4870-08d539222348 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286);SRVR:SN2PR15MB0974; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB0974;3:kg6VcC4DCh1q8ojPOZcCr/fhtPUyrFGdUPVMswjwFcGKsEj1jYtqlV53/WUfJmAmd1v67Q96frD/OZ3DmJ8H1wUVePAKjOc0xxr7vf1U3lqpDKRXAkyJl2lko5UX2KoTwSZXUzUFtFFBQjGPVOHsMU5mI8faeJZku/L0lk6TjHcp7NEYB59AA8xPYEaVRcX6h0Gxc2QqAt3UhY5oBFFmkvwzr1CIbmvN9uO1Yn+ta14wSMchdAjedCMY4LX9gwGc;25:b3cUq8Y20htnsKqghrKGrUL/7tcBA6fERc9uulCKNunsf24GQ5AwAPYIfpsLYIebi3Wd32HJ2vN9h4zTW4fXZOZq1pSGwBbiah1scRf24l5swJOPOebkB+cs+3DTH01e54oKAeBcSUVsILE54n+uSrGdN93gJhC6fSMLR0epDSu0bir9JH2cMyP5T25dDBAn2+hhn+AcA8VvHe6V6eWJkZud4+O3DnlduoMMADrJ0t3dzGe0pTJM1uQCKE0adU4PYQTYNkRucXjGBwf0ApuOWU2QPgi6I6WQfDmnQDxF4iwqm1P4fZHQ9u4xOZq1Dk8BX9kL8FEBb/bFUD/xkYRsdQ==;31:KQiF2qnBA8G1M6zG79OvwvtsElqi9I1EeWm7endpclAxlsHQCNOOgNQz2/nd4NzIaoJrVXzic63Av8CxFy9g49kvTXFUdgOzgTm0Tre3bFvi7kHhszQm+UXuQnKi3QlO/annXoUVqty8lYwarXSgRvM038Jv/0b1muxb0Pw6LQ43Fhel/wJRXciqSDyNnMRSCbDmDOsw30Xhrz615Gk53wfNf9Vxjyie9CgGp6qV4gE= X-MS-TrafficTypeDiagnostic: SN2PR15MB0974: X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB0974;20:j60wKS+lB7OjpL59GG9OoaLiFGgqMqDeo08SkWP2itaapHrCV5SJp5k31ArF6rZb/AeiaIwDFvKJP/kf3vUbp9B+djf6IAUesjYndC1kOmeEzs5OzYoAy80BlpFHEtgA29ZQjp5M/vJ1obRmBUI7ZjN4S89ZdPlyCo81J8ANlKcGxh3jRuXWhQKLg4G1F8vF9ibBhux6KVkgd50qT0Ut6xeJDbHetlS3R0Ro+vErmByxZ8BeKP/yGpcq5lCcauapMSYeHFneq2dya0lLZg5mEPlrtzpLiENCOB26Y0ql4RnIg1NiQMb2czRenduu9dT+GIvMgZKBNRQPBTUbcl6GryfSZ8bvcoR2hsSs6pEWkaarZqPX8AR7ZVsqsThClai4wXaRnt6pDrd3XCThOYeCFQ5irtwFLuMt0YrdyCKcqOGJ8XWwxNbo1gwNnmpFweKKuyRvuK+m3ki7PvuJOC4zVGm2tChZkJCmJyE3K2OkLsl9mmYuB+aaSY/UgCw5vjML;4:XQAyGtlGveNJYK1660kBHj8iVUuP3E363257pMp0FD7iDaL4TD2wQLJ0VhRA6DlAyiJT/gGJsqWUIFbT35lN7CnZNsB6ra15Sf3MVeBVv2GADuYgJ1T+5LEtVD1SsrCSqQPxYBR1nhZprw2OYCIQxwZjzfF9qSt34Y/B9pmHWD1pZmW92N+/GwPtewTXmPPydvW3+yKQf/SoQTAeq9xpAyELCfWKXTz2cM49eZFyPf38y3K3fkxwkxJubYbFM1y886c4sGmj7h3ubgUaRNRyKw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(11241501159)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231022)(10201501046)(3002001)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:SN2PR15MB0974;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN2PR15MB0974; X-Forefront-PRVS: 0509245D29 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(366004)(199003)(189002)(24454002)(5660300001)(316002)(54906003)(229853002)(58126008)(230700001)(6916009)(23746002)(93886005)(6666003)(2950100002)(50466002)(1706002)(106356001)(86362001)(65826007)(4326008)(105586002)(6116002)(101416001)(478600001)(31696002)(33646002)(53546010)(6486002)(53936002)(64126003)(305945005)(8676002)(36756003)(81166006)(6246003)(81156014)(54356011)(25786009)(76176011)(52396003)(189998001)(97736004)(65956001)(65806001)(47776003)(52116002)(31686004)(83506002)(68736007)(8936002)(7736002)(2906002)(39060400002)(67846002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB0974;H:[IPv6:2620:10d:c081:1132::1089];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;SN2PR15MB0974;23:dNEzdqoSgvBpqqWWLsC0s9XQNlzu1BEw2/5lz?= =?Windows-1252?Q?JBB6+C6gCoZLTHilx/XFrWpt3AIk5ZhnZv6TJ6+NvW9rkJrEA5uqLIVK?= =?Windows-1252?Q?ntOLNi5TWObKUdUolZzgfTNiO4i+ymgAjq69r0A6DtID7sbCamans2Sa?= =?Windows-1252?Q?ID/692wSXOYvIvfW9NE+9R9iBgYdN4VwXWP4e2OUO0xwGLcw05fLfNIZ?= =?Windows-1252?Q?FJLHDQMXFQFw+37CRjPDnjE8Zh9o28zXlzXnuO0/VZmoqA6LPZyV1Cz+?= =?Windows-1252?Q?ruJSPdzMvOpj/6+LJcZvqjAUIkIT1SjvJqdpgkhnfYmudJCKRBIaiqBy?= =?Windows-1252?Q?d1mNu47y+ua2oCtb3tOM9u8fJk6vWZp6rEtQbN/nx9spYU22kH9wETb/?= =?Windows-1252?Q?x9S6ksA0FvQRP8Z6xXX718jXOa3l2/JQJIhH5gan+iUmEWNVVpvPIf+2?= =?Windows-1252?Q?lwh00oFi0E1NvsXhhX78zIaxckVNpR9Uj+ZKLrfUuCvekqvZq2NYDrHy?= =?Windows-1252?Q?Egzc/w4/bIaJEwY2iSd4aEEH5fzubhCXypE+qvPQNriMwY3O7CRaflN9?= =?Windows-1252?Q?sa7AQ6wd2zIb9946JflNXxdUtXYXpaYQirXZuNF8gPQmwf+qLT64VRp8?= =?Windows-1252?Q?/WNxjGt+nsDKaoPwRqGGUTQ2zuNkiIQ87YLzCW3GpAG+Bw2tw807J7gz?= =?Windows-1252?Q?79BFqqb1L3CeKgKEDmvRNXiv81cLIFbKxGkqLfpSy0cOW8PTV3RA50n5?= =?Windows-1252?Q?VWlMllzgFoewBG3chxWlBmMSlU6ZZKFwgR+UA+VlwDyvplooNgYlXs5T?= =?Windows-1252?Q?7oSSarIowxQ7hmEt/9KKk/z9IcwbfZdPugM/hhXiQ4ckau7SeuFlIzAk?= =?Windows-1252?Q?VGMKPvtWE9c6VGMut4hEmUhAyMJn6GoD/UsaDPT7EC6u1MpmL4QhvZ64?= =?Windows-1252?Q?Jar/mkfSqd74uYb0W5e2lOCEZb5m+0uzW1Sa18qIUDJc1COfA2kgG7Qi?= =?Windows-1252?Q?xYRN8j0bmQFlKTTFkSFQRRTDwG+YddXn5Jwl/qnTjc/XakoIr2TM+LYk?= =?Windows-1252?Q?JAPxcwuU2TtHV8sviQg2mj05QZSGsBmB1mnk5uHYOe5F3q1qWtBHl3TT?= =?Windows-1252?Q?BpBE9hNbkqb8tr5whokWv9jbtSgZ+rXcxBYtW6o4EoT3DUJ41lR2fOGT?= =?Windows-1252?Q?5H4Ln9A+9uZ53s0lRTNFIkOEWitGr8ZahykBxTjeL996m0ZsECpvxICx?= =?Windows-1252?Q?7UBpnlG4f+IR6zTnCXPxnS5Hn/98PBek69IH75yGjFB1k9xbl0YIioPO?= =?Windows-1252?Q?QSMKow4ra/h3suDXZsLfgbX2ICHzynjZuxwzWNtRSMdD2H6hBLYjhGw3?= =?Windows-1252?Q?/5VGLoHi9niKgZtK0S3izO6PDPvkQ5zJjzrdS01ubdnvnQRH7Lsu0lp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1;SN2PR15MB0974;20:l8aPVq6GBypm/FXlyQBTXqy00BYNgPGAxnqL/CSGx3TL1O/C6jCUKDkF4Q7/2PUmrGBT45omlCmyeg0Qa979VcawcOZ55HNR5uNtDtFczYCM1+a0vCiUShoCc2T00oo9LjUP71CO15lyffX1j9gkiYyxYYtTAIwCGeA75eC74Ok= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2017 01:15:11.5466 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ae91867-e6c2-42d0-4870-08d539222348 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB0974 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-01_07:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 987 Lines: 18 On 12/1/17 9:51 AM, Arnaldo Carvalho de Melo wrote: > > But this is not just testcase expectations, the usecase is someone > wanting to use a newer tool, with perhaps some new features of interest > that don't depend on changes in the kernel, in an older kernel on a > system where updating it is not possible or desirable. I think it's also dangerous for the core library like libbpf to be smarter than the tool that is using it. In this case we added prog and map names by default into loader and create_map functions to make sure that all tools pick them up automatically and we can see a bit more human readable bpf names in kernel stack traces and in debug tools like bpftool, bcc/bps. When kernel is older and doesn't support prog/map names, it's perfectly reasonable to fall back to map creation without the name, but library shouldn't be doing it in all cases. Like prog_load command recently got new prog_ifindex field. It would be incorrect to fallback to loading without it.