Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbdGFS1Y (ORCPT ); Thu, 6 Jul 2017 14:27:24 -0400 Received: from dispatch1-us1.ppe-hosted.com ([67.231.154.164]:35548 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbdGFS1W (ORCPT ); Thu, 6 Jul 2017 14:27:22 -0400 Subject: Re: [PATCH v3 net-next 00/12] bpf: rewrite value tracking in verifier To: Daniel Borkmann , Alexei Starovoitov , Alexei Starovoitov References: <5953B436.6030506@iogearbox.net> <788035e1-1974-b48e-3008-d294194a8b05@solarflare.com> <595413AA.40502@iogearbox.net> <20170628213701.32krfuipzngsmt4k@ast-mbp> <91267d15-652a-16d9-4ee9-42958bd842aa@solarflare.com> <5fa61129-fa82-1607-3363-dfad86aecf1e@solarflare.com> <595C1685.4060209@iogearbox.net> CC: , , , iovisor-dev From: Edward Cree Message-ID: <54b95191-697d-6b15-ec39-438c85e08adc@solarflare.com> Date: Thu, 6 Jul 2017 19:27:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <595C1685.4060209@iogearbox.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.17.20.45] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23178.003 X-TM-AS-Result: No--3.338200-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1499365641-iQOubjG5kmPy Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 28 On 04/07/17 23:28, Daniel Borkmann wrote: > Have you tried with cilium's BPF code? The kernel selftests are quite small, > so not really pushing processed insns too far. I can send you a BPF obj file > if that's easier for testing. Results from the next (in-progress) version of the patch series, with the 'id' bugfix I mentioned in my other mail, and rebased onto an updated net-next (0e72582). Numbers collected with: # tc filter add dev lo egress bpf da obj /path/to/bpf_object.o sec $section verb 2>&1 | grep "processed" | awk -e 'BEGIN { N = 0; }' -e '{ N += $2; }' -e 'END { print N; }' Program net-next short full bpf_lb_opt_-DLB_L3.o 4707 5872 6515 bpf_lb_opt_-DLB_L4.o 7662 8652 8976 bpf_lb_opt_-DUNKNOWN.o 727 2972 2960 bpf_lxc_opt_-DDROP_ALL.o 57725 85750 95412 bpf_lxc_opt_-DUNKNOWN.o 93676 134043 141706 bpf_netdev.o 14702 24665 24251 bpf_overlay.o 7303 10939 10999 Conclusion: the ptr&const and full-range min/max tracking make little difference (10% increase at most, sometimes a decrease); most of the increase comes from the basic "replace imm and aux_off/align with tnums" patch. So based on what Alexei was saying earlier, it sounds like the answer for now is to up the limit (say to a round 128k), get this series merged, then start work on pruning optimisation so we can hopefully bring that limit back down again later. Sound reasonable? -Ed