From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id E61DA3B2A3 for ; Fri, 17 Mar 2017 16:11:48 -0400 (EDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2965D8050D; Fri, 17 Mar 2017 20:11:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2965D8050D Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=brouer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2965D8050D Received: from localhost (ovpn-200-16.brq.redhat.com [10.40.200.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A91118998; Fri, 17 Mar 2017 20:11:45 +0000 (UTC) Date: Fri, 17 Mar 2017 21:11:42 +0100 From: Jesper Dangaard Brouer To: Daniel Borkmann Cc: Eric Dumazet , Markos Chandras , bloat , brouer@redhat.com Message-ID: <20170317211142.6c1a07ab@redhat.com> In-Reply-To: <58CBD238.7030508@iogearbox.net> References: <27209.1489679549@obiwan.sandelman.ca> <1489681664.28631.221.camel@edumazet-glaptop3.roam.corp.google.com> <20170317100214.600bc15f@redhat.com> <58CBD238.7030508@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 17 Mar 2017 20:11:49 +0000 (UTC) Subject: Re: [Bloat] high speed packet and protocol processing in userspace? X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 20:11:49 -0000 On Fri, 17 Mar 2017 13:10:32 +0100 Daniel Borkmann wrote: > On 03/17/2017 10:02 AM, Jesper Dangaard Brouer wrote: > > On Thu, 16 Mar 2017 09:27:44 -0700 Eric Dumazet wrote: > >> On Thu, 2017-03-16 at 11:52 -0400, Michael Richardson wrote: > >>> Dave Taht wrote: > >>> > Is it faster to execute 17 bpf vm instructions on (nearly) every > >>> > packet, or to use all that old stuff? > >>> > >>> My understanding is that there is a JIT for ebpf. > >> > >> ebpf is pretty fast. > > > > To Dave what kind of arch are you running on? > > AFAIK you were running on MIPS right? > > Just checked the kernel tree and I was surprised to see a bpf JIT for mips: > > > > $ ls -1 arch/mips/net/bpf_jit* > > arch/mips/net/bpf_jit_asm.S > > arch/mips/net/bpf_jit.c > > arch/mips/net/bpf_jit.h > > > > But I don't know what state it is in (Markos?) > > The JIT is for cBPF right now, but Cavium guys mentioned on netdev > recently that they're going to implement an eBPF JIT for mips 64. > > You can see current cBPF and eBPF JITs that are supported by the > kernel via: > > $ git grep BPF_JIT | grep select > arch/arm/Kconfig: select HAVE_CBPF_JIT > arch/arm64/Kconfig: select HAVE_EBPF_JIT > arch/mips/Kconfig: select HAVE_CBPF_JIT if !CPU_MICROMIPS > arch/powerpc/Kconfig: select HAVE_CBPF_JIT if !PPC64 > arch/powerpc/Kconfig: select HAVE_EBPF_JIT if PPC64 > arch/s390/Kconfig: select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES > arch/sparc/Kconfig: select HAVE_CBPF_JIT > arch/x86/Kconfig: select HAVE_EBPF_JIT if X86_64 Thanks Daniel, this is very useful information. Doc this: https://github.com/netoptimizer/prototype-kernel/commit/ff51c31123de1220 -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer