Received: by 10.223.164.202 with SMTP id h10csp492363wrb; Thu, 30 Nov 2017 13:55:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMYvAtCF9r9H8aYDUHlbk+PCU8xVQXh7EJ2b/Wep2sJ4H45+Z0ztNv+4yUeUnA0A1ZnC9Cmm X-Received: by 10.99.55.30 with SMTP id e30mr3669909pga.156.1512078937290; Thu, 30 Nov 2017 13:55:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512078937; cv=none; d=google.com; s=arc-20160816; b=fiG1D1nSnTEZVPkJ6QbvqyCy/ZpS2fABfhUhlHcRaNoqRakn4Ufv8xdBiQ6gQ+Yhmp T5QWwbSzp/ShgfRKXtFHK7ISQCNVO9hI28xCzX3/h1EkCwKwf24OCJlCzhKk9t5MQUrH k4Akb1vue6e7fHcL918WEScEao2yI3RrTcw2lpfPp3OogRmN1LQ+eHZ9rKHwvrSn27b/ e35a7kVtNFBpFyp6/RTIdU06vOHyDlQ7iD4ERTPVGbkca7KEuviqpvzOrPPyJrFbNutL x7eacMkdg27/9M1yxXgQO4N6zSAzOAKkTm13j4WVbU7BMt9UUn5g96bBpWKyK//q5aYj dGGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:dkim-signature:arc-authentication-results; bh=+t5Vec4KNWPfmPyPpirgVNVVxa3P9nxi8hbluzfKJKY=; b=xoVsDklCliaXx56uTO1kB1ygqOAHmFbwadvMUFC/LudXPZmngKe2e5IHnsUkoGLnEf 8+6b7ifPMRyWCmKmlRVEuQ/i8+S6EYodkQLCIf+ehskXUPHaHlVilMi2B9xPop5JhqbY L4yDkWppJ37hpM/Ye7AMoONut7p6kvuAiIEmOCSIl7ExmIa/2EatmpUQQuG8E+Ni1Axi EwUjV6ok1vmMn0NafefBPr0iehUq+oyPrauQSkbI8Zraw83esntJeGv7dzpqaYrUjmo2 cmYc9cgRI0Jw6fcckub0lv0RNDM4AdoaFVMy2k4YHZqDkSmXbyPlejwv8VhHaTmtEJe8 riRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=GM4oI5mT; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=JHBQYv7w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si3722179plk.90.2017.11.30.13.55.23; Thu, 30 Nov 2017 13:55:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=GM4oI5mT; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=JHBQYv7w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751235AbdK3VzL (ORCPT + 99 others); Thu, 30 Nov 2017 16:55:11 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:58564 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbdK3VzI (ORCPT ); Thu, 30 Nov 2017 16:55:08 -0500 Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAULrvUZ011387; Thu, 30 Nov 2017 13:54:37 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=+t5Vec4KNWPfmPyPpirgVNVVxa3P9nxi8hbluzfKJKY=; b=GM4oI5mTIjU0PjMRt+7/+8+tb9XzJpkf0fH8Y4T7OJDzhvDX4+SR726IQecxFhe8QGaK R9ns4toyXxm07eEG2eKroGBZbZovZK9nEuH4w6NA37/fQTwaifgNrp9WNX8IeizDiGJ2 43Hc8Q64f5SwSxUpk9HPRcsOwAAq3bYWDko= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2ejr710pmg-19 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 30 Nov 2017 13:54:36 -0800 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.29) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 30 Nov 2017 16:51:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+t5Vec4KNWPfmPyPpirgVNVVxa3P9nxi8hbluzfKJKY=; b=JHBQYv7wQtkmBo6S8gTF2bocRuKUde2U9fQunX4jAM/rnfdkyjPsAEaLLkd39cim0CLq5tlMg/id8jbI4S7shJVisEjbjfsqHZWKqz9ZemqGz5Jl3uvWIByeG1K8wWxWcO5klyV2520vyEO/JrZX43R1+hz+y5s9TAc0+9t8Wes= Received: from [IPv6:2620:10d:c081:1132::10bc] (2620:10d:c090:180::1:3d07) by SN2PR15MB0976.namprd15.prod.outlook.com (2603:10b6:804:20::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 30 Nov 2017 21:51:38 +0000 Subject: Re: [PATCH/RFC] Re: 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name" To: Arnaldo Carvalho de Melo , Martin KaFai Lau 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> CC: Wang Nan , Daniel Borkmann , "David S. Miller" , David Ahern , Ingo Molnar , Linux Kernel Mailing List , netdev From: Alexei Starovoitov Message-ID: <312f7691-cb7a-5c2f-18c6-ab26cfaa26a6@fb.com> Date: Thu, 30 Nov 2017 13:51:15 -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: <20171130190042.GQ3298@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:3d07] X-ClientProxiedBy: BN6PR21CA0010.namprd21.prod.outlook.com (2603:10b6:404:8e::20) To SN2PR15MB0976.namprd15.prod.outlook.com (2603:10b6:804:20::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 487ba80c-5a68-4caf-8964-08d5383c89a4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286);SRVR:SN2PR15MB0976; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB0976;3:qKB8towp5fC18gjY3NHRo2A6ApKmSAzDbMGOGMoBN1mpZQeF4g4q4pl5r7cA9KpxfeUX/n0RRCYpc3iiCMX13rUNwl0f0jYsrQ3RCLhCn+xku/8joOMECVj5m9sjOJj7vjKNM4p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pa5BtbIrevOKGg0GJUDakqv25rGaRZBuwjfiLv51ZmA/qR2FDXiSx3zqb5Pva2zjr0k5SorX2j04ctyhb0pRBYFO85lWZggsntX+85hwpL25yuVtlef4oThFA1uC2nkAt64cZyme/+8IFB6po8Kk/xb3fRYvCHFqQRSfMM4q+TsNYIyzlbR/qbb5B11eFXXEF;4:4kyFTUuuz+dMfup5w7xPrYgcYF5ngtCSXvSoaT9W6z+8PpKmHHDNGCzdmCNzWeuuM+GzCK6Qo+qhau5ZftZmAIiq45FY7i+r4TAGmE3eRJf6tAN9+JkPFwrOl0q2/Lq7x4RNrAeiceQtkmULx3K269pVeomP5Oj+mOKHc7rO4vUmkgX4qmw9O3jyxXLoZDeSE0F+sXMD4NprzZ4nygoz11j30fjJeqSMQW0RuuVc4yXw8/sr/RIQHTeFkGaRA+ubl7moVR/vWCvzA9ZscrodkQ== 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)(10201501046)(3002001)(3231022)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011);SRVR:SN2PR15MB0976;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN2PR15MB0976; X-Forefront-PRVS: 05079D8470 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(376002)(346002)(366004)(189002)(199003)(24454002)(5660300001)(65806001)(8676002)(81166006)(189998001)(47776003)(7736002)(6486002)(65956001)(81156014)(50466002)(316002)(97736004)(229853002)(52396003)(54906003)(478600001)(86362001)(93886005)(76176011)(58126008)(31696002)(23746002)(67846002)(52116002)(6636002)(83506002)(2950100002)(2906002)(31686004)(6666003)(36756003)(25786009)(105586002)(8936002)(305945005)(65826007)(230700001)(39060400002)(68736007)(101416001)(64126003)(1706002)(4326008)(6246003)(6116002)(110136005)(53546010)(106356001)(33646002)(54356011)(53936002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB0976;H:[IPv6:2620:10d:c081:1132::10bc];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;SN2PR15MB0976;23:SRcrz+X4uDSm893xhgbh0y0+sAp/cGIaVkhzy?= =?Windows-1252?Q?x700r+rakh1JvTnE35qVChBuV4jZg4+QFwHXKQ+PlwEZV2vNDT0H/23V?= =?Windows-1252?Q?lULkMuZva/UYNJbj4r/8me0542y1/MRzBAankh2v495ZqLKHgR03Uneg?= =?Windows-1252?Q?umF0qbqrev6B9ubFK8gXeu5hNyrgiCqHy6rjt+qRmAwRrx5J3CxOcPJj?= =?Windows-1252?Q?V7RRSNItZD6hQPx3l6OxmVZ5t0kROZaJ3wlH4GW31b84j+PRl1nJgQ2g?= =?Windows-1252?Q?QNNiw++tQRWdKMZtmMeCJHjzbkNpE0CkhNurcPyHOCt5yDj5JfW3QoKQ?= =?Windows-1252?Q?t+DHBvXh5iQ8MmgVjD/mASB5ijSVhvwHdgyaEWnPZestMLUUgjAP93yL?= =?Windows-1252?Q?Fk+GT2+4bkUG19/cFVq0AkAFHeRlSjQnpKNO8RyjIGsGFEr8ZMqivRxq?= =?Windows-1252?Q?SFPkjTUdWCeW/I7j+T5txcAxmKLKIDS4+Fqb4BodOnGuayxmkNTf/VpL?= =?Windows-1252?Q?LpPCjH5wAMoqlEQud97yXX5kLqLQS8ZZMkBgU1+BiJ6aOp2HI4RZ73C8?= =?Windows-1252?Q?VGKW44gaqMmF8naPs2OplxBAFKWCPaW/I0cWmkxgPB/F2DAd/DsZHpvC?= =?Windows-1252?Q?N1qANIJwAmOVy/v6LYzt7eOOFxnoRyYFWuzZJt+NmEq7DqnRI7NoRWxx?= =?Windows-1252?Q?AEDJmkUYVu8swzorJjCXhdwa6cvIqUPkRrs8jvCzLsL1iKUCfGG4/sAF?= =?Windows-1252?Q?zX/ox3kSSnsxTtJU+vYJdsENRAE+AaxRxxUHcW7irFz5/dA+9cLyjUDo?= =?Windows-1252?Q?JaVkwa05iFXmtHIFAyJIiF+PyYfy3+yvRPOHvgggEhjUXT8LmW50Dydc?= =?Windows-1252?Q?aXGDT8rk7KC5iqKd6jPXzNBTgRG8DfL9hzmk6ctnJ+W90XvhW/swqYrB?= =?Windows-1252?Q?yFysvOVRpXsDMVSzYwPsiIK0J4aUe2uKlZ+w0tjaOHULHQSEfhk21QOd?= =?Windows-1252?Q?Skp+Wlef0GZy+Xcp57eN+xIbPz6x+N9/YywrVPWHd3B4DvpKEwR5kc+m?= =?Windows-1252?Q?Xds9uK9rPzeoPZskg2lXa9Wh4ArS39JgtvQBK+5HAABgDpohVBPc51f/?= =?Windows-1252?Q?nwaHelgyEDZ+1G4MITD/WJM9/GIJISOOgvezrSMaHaIjajuIqmktceXB?= =?Windows-1252?Q?qoQiErfgvoL741mq796pYqarHSbCXGbYtuuewKVXQ212NdWyn8o6nry+?= =?Windows-1252?Q?67NO71VACecj9lEMIKvguvyg3UKmMRn8NQo9YIoCPGANd31pEV+O6T8r?= =?Windows-1252?Q?hktxxX6rxFhXN2QDAo0qPIv8GAGqTNg5eVxB7FdRJA0tZQRqUJoUwnFI?= =?Windows-1252?Q?F+JIq2XaJc4XuymkuUsHnaN0SasyVoSkqEdF9w4U5w2K37pLbJV1i9VH?= =?Windows-1252?Q?1eGdf99bdM7VJ+/vkDq3nd2nwtVWoJd2TEdgdct7NB1P3mqq8pTGrYgJ?= =?Windows-1252?Q?vmD7M4=3D?= X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB0976;6:6jnvO5g3P5GzvVqveKT9tUn5SitWIwuD0C5AH6PqcDpFFmF85WqT/kFgBzg5Zo3z6hAt1h0PS17pN9Q1gS1Q2njxszI1bBqqubKm7c9TWRIl7SjC422a91OQVdZiejZotCOHzqyK8SqUHXXhaSXcHkZAMlaZ3YWRgD+7n22AafLG4NNc4Aen7SXDJOMk5yWfw3k3KGZED5j6dnRg1otjXNfo+bE5ZwW67fptei7x/YllmPrAjD3eE/Ae1dXcCac59N4gXqrWysSayfwC6FmaHpA+KgQtgua4w3kCz03HtWXTM2X/66whUwv7BwTtaGqnsBsutq0R0uU26JGtIc2LHZZBsMpW53WgpJ0XL59BX5k=;5:voVSGqC/UHUn6PsO+jMTUu4ttqxYErBKdU0sBKZe42YYLGXZ9sJN4LwccPyqEpvWKNKV4anqOpFikuBll98VQzstiAw6OP6Qx1N56VWhUiglXsCYHNpCYvw5dx3mV5DQgrOdD1eH556j5173EDhaXACpBQI0Y/2LtvOCMPNPSos=;24:yktWl82yLf4GtwkcN5fmTt7odMXpBmQMdlFcsUJtmD7tBIfv1O/J2r9pQa9TihZt4CIfiOSeG3frUbWwtxaZArnwXlt9zHbesQAFx0boZcs=;7:O+14ribp0psGxaHsrZkC5y/EnlcyezyYOeKixZe5vS7BwqjilN3UEhrmsL3xj0bbbOaqmS7VyPAMl7YWzQg7D4kotXrqqDPzdZZElc7WGITPh+m41RxjJewRN0WlTR7hW4SjovYzhBSjWTsyqHskNLyDu/tEFrUQnZOw3UfXwc24CL2HrkDJ/jznkxhLPPUh9EZutLHGohXb7HiS34nWCD0aHfy68+ssWoJL8nPzxkKpR0fTEKp/0RB177tgNgJT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB0976;20:prKTIBrxOfDvQpy/PeG9dV0DC/a/LoXJTq7otWeFm50pjzzXmXRQfP9XwOOXpwxY4EyausQwvywtYCiz8n6DzJJ0EqeXycPpFlJIF3wVS9/TjQCeiwkS2+yBiLQ4OqI9Vxuwy2jzxmKFrqBGT9o4V7X8dRtzh5zNoautouXwuog= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 21:51:38.7028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 487ba80c-5a68-4caf-8964-08d5383c89a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB0976 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-30_06:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/30/17 11:00 AM, Arnaldo Carvalho de Melo wrote: >> Instead of sinking all future bpf_attr's backward compatibility >> requirements to sys_bpf, I would push it up to its own BPF_* command >> helper which has a better sense of its bpf_attr, i.e. push it up >> to bpf_create_map_node() and bpf_load_program_name() in this case. > Humm, we could try that approach, but the one in this patch seemed good > enough. > > And after all if the first syscall() invokation, with the latest kernel > and latest tooling will work, right? I agree with Martin and I also don't think it will work to push logic of all bpf commands into single sys_bpf syscall wrapper. This logic will become more and more complex over time. Like this case really belongs in bpf_create_map() which is a wrapper on top of single BPF_CREATE_MAP command. Note it's the first time we're facing this 'new libbpf.a running on top of old kernel' issue and should be very careful adding such fallback code to the generic bpf library, since all the selftests/bpf/ are using this lib and relying on excepted behavior. We don't want tests that want to test the latest kernel feature all of a sudden pass on old kernel that doesn't have it. To some degree perf and selftests/bpf needs are diverging here, so adding #ifdef to libbpf.a to match testcase expectations may be necessary. From 1585518758041948768@xxx Thu Nov 30 19:01:57 +0000 2017 X-GM-THRID: 1585337848965420889 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread