Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbdHRXkp (ORCPT ); Fri, 18 Aug 2017 19:40:45 -0400 Received: from mail-cys01nam02on0061.outbound.protection.outlook.com ([104.47.37.61]:54752 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751337AbdHRXkm (ORCPT ); Fri, 18 Aug 2017 19:40:42 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@cavium.com; From: David Daney To: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, David Daney Subject: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT Date: Fri, 18 Aug 2017 16:40:30 -0700 Message-Id: <20170818234033.5990-1-david.daney@cavium.com> X-Mailer: git-send-email 2.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: SN1PR0701CA0082.namprd07.prod.outlook.com (10.163.126.50) To CY4PR07MB3494.namprd07.prod.outlook.com (10.171.252.151) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc472d58-045a-4664-3f71-08d4e6928859 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR07MB3494; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB3494;3:UhtzLXe3xUOMVR7e5WzTFlmTXh7iC705WAr9Ji07hion2VTahNsdxo8RUhIu6SI+YopXzR5/tT6Vz/82xZJ7RUU/ybG9v+dhExFD6cn9f4lnbj5aYNqSdwgg3aM+M/Np+242gkLmF9tytgFUau40zNPOqq7c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kGVVHz7f5Va4v0f7XVLc/pnQVIYjToBZQuewhwXtr+M0+mg6HivEQ5IeMazQyeQCYu06whn4kdmAHRtQ2o+7NANigtIcI0CNhRyGjU7xqJ8NBpuNuzRT4WlCzxkYHswrvu6dRsrOaB2NUd5gwzB3Pbp4gvQhPiYvKWp7zGIXKTJFlvfut1XqIUaOTGs23VlzGJxTmaUmOj7Sb3AJN;4:WcmWqaGfqQKn5y9U5qbvTVeuUPWK9rCoYV3JbLsOEuiwWRFQ5kAMonuBSkk/LoVG2iRJuXreRVuWuRjxWqtQfJSJqvQtpgIIpQOCw504RPgIFUpGNgN060sfbISfyQe5+3ndins0RF+3izE1TtSlikbsNrcU42NqtYDoekksuE158YgdElF4Hg3QivFj62YCQS/pBD7JLjrDbbGclR8D/XBHOCX0Yw4nfKSLPtCGoewRQ41Slw9a2wfdDty0QdnS X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR07MB3494;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR07MB3494; X-Forefront-PRVS: 040359335D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(189002)(69596002)(50986999)(68736007)(6666003)(47776003)(66066001)(81166006)(101416001)(81156014)(50226002)(8676002)(305945005)(105586002)(106356001)(36756003)(33646002)(53936002)(1076002)(6116002)(7736002)(53416004)(3846002)(2906002)(107886003)(6512007)(42186005)(189998001)(6506006)(6486002)(48376002)(4326008)(50466002)(5660300001)(72206003)(97736004)(7350300001)(86362001)(478600001)(25786009)(5003940100001)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB3494;H:ddl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR07MB3494;23:WPJzhivuzLdBG45m7AQoLJE/dOeZymvQVcODKrA9n?= =?us-ascii?Q?egSSj8usZ2NedgAdcM9Fnxb1cA0KWwbnCRIgvMhi0Bda6GKRrgWBt1i3BDgJ?= =?us-ascii?Q?yp/gwvFYN5vFT3pvwRoHnO6Y95tDRgffrc+elWQhh8DN+FI8rfbCmWka+8Xz?= =?us-ascii?Q?EllEfQcOSzuklMXMf2nChiKLwlPtz4wO91wBuqNvNPmc7C5aXiPblGHS+j3o?= =?us-ascii?Q?Qy0cWF38/ay+xnw1sGQn2t6nA6Y3uw/kFm8+gywwPOUyIVlENn1XAYW3KFDg?= =?us-ascii?Q?Q5GBQBLfuABCcemER+PR+v2kyH5Jesihxu7McLvFc3GNI/6dOB1eQR0h007c?= =?us-ascii?Q?R1fyOo4LjsC1neqAqMFIAAUZ/F3pLIzoYEOvFBGir619SGL9ZcEAd8ne0AUH?= =?us-ascii?Q?0kd7WzO1Omo5+FGGjJ7td45y/vZhCj79QfO14e2pIInDwAxhxZ4XwkG7FKMn?= =?us-ascii?Q?rSXBWuwFm+vxeUFYp0B85DwpakCh56pbkzz8tLqskOfGFGardq8msz45ZLc5?= =?us-ascii?Q?5/HyIsDxTbOI3ipmQXRA7kppdsV5B/ZFrriOdoAelQ2PCj0nlqAgiXVGAKP+?= =?us-ascii?Q?YMLZsjCknOm2Z4cx5SBCAB6arNNn2qQAXw2We1MUw4qtDqxHwctBdtuwbTCz?= =?us-ascii?Q?g+mCcG8EQA3FfwgvnuOBh/h61Gr38EypBKWS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W1z8A7Bny0/5zNWIUtMDF+Gg==;24:oiJK3t1kBEVugKPazpJo6awjFTpbUsL+ob60KA/HKm2QtKLXtWbxERtyWcCjDlcufWojrsUeuhHwDsyvvDawHDqgfRP+7PbYtekBjA50TJM=;7:hY3hTVUoYKrWpEQ+3GDN/bexJyHBPunubbsLPTTLWjnL398/Z6fRWr0rSmwJDYtvOs673HNTelt7vYY292qCIhTy/NDUIOzEt158fEtkhlmLXu0Qicw73g49ECH7dhTL4AtvZDYQGBiFxC2yQFKZTfc9eLLiACJ2q3fYH09fxv+SogQMLh6PU1m3X4GpytkBYBUkM5NvqyLq0HoxFP5TnDFtyLqAuvLNFpnmGz4aM+A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2017 23:40:38.6591 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3494 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 24 Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small cleanup/optimization in the use of BPF_OP(insn->code). I suggest that the whole thing go via the BPF/net-next path as there are dependencies on code that is not yet merged to Linus' tree. Still pending are changes to reduce stack usage when the verifier can determine the maximum stack size. David Daney (3): MIPS,bpf: Fix using smp_processor_id() in preemptible splat. MIPS,bpf: Implement JLT, JLE, JSLT and JSLE ops in the eBPF JIT. MIPS,bpf: Cache value of BPF_OP(insn->code) in eBPF JIT. arch/mips/net/ebpf_jit.c | 162 ++++++++++++++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 59 deletions(-) -- 2.9.5