From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754115AbaCCJ7e (ORCPT ); Mon, 3 Mar 2014 04:59:34 -0500 Received: from Chamillionaire.breakpoint.cc ([80.244.247.6]:50258 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbaCCJ7c (ORCPT ); Mon, 3 Mar 2014 04:59:32 -0500 Date: Mon, 3 Mar 2014 11:05:01 +0100 From: Hagen Paul Pfeifer To: Daniel Borkmann Cc: Alexei Starovoitov , "David S. Miller" , Ingo Molnar , Steven Rostedt , Peter Zijlstra , "H. Peter Anvin" , Thomas Gleixner , Masami Hiramatsu , Tom Zanussi , Jovi Zhangwei , Eric Dumazet , Linus Torvalds , Andrew Morton , Frederic Weisbecker , Arnaldo Carvalho de Melo , Pekka Enberg , Arjan van de Ven , Christoph Hellwig , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jesse Gross Subject: Re: [PATCH v3 net-next 1/1] bpf32->bpf64 mapper and bpf64 interpreter Message-ID: <20140303100501.GB1108@localhost.localdomain> References: <1393468732-3919-1-git-send-email-ast@plumgrid.com> <1393468732-3919-2-git-send-email-ast@plumgrid.com> <531084E0.5080601@redhat.com> <53112A08.5080309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53112A08.5080309@redhat.com> X-Key-Id: 98350C22 X-Key-Fingerprint: 490F 557B 6C48 6D7E 5706 2EA2 4A22 8D45 9835 0C22 X-GPG-Key: gpg --recv-keys --keyserver wwwkeys.eu.pgp.net 98350C22 User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Daniel Borkmann | 2014-03-01 01:30:00 [+0100]: >>>as in 'struct bpf_insn' the immediate value is 32 bit, so for 64 bit >>>comparisons, you'd still need to load to immediate values, right? >> >>there is no insn that use 64-bit immediate, since 64-bit immediates >>are extremely rare. grep x86-64 asm code for movabsq will return very few. >>llvm or gcc can easily construct any constant by combination of mov, >>shifts and ors. >>bpf64 comparisons are all 64-bit right now. So far I didn't see a need to do >>32-bit comparison, since old bpf is all unsigned, mapping 32->64 of >>Jxx is painless. > >Hm, fair enough, I was just thinking for comparisons of IPv6 addresses >when we do socket filtering. On the other hand, old and new insns are >both 64 bit wide and can be used though the same api then. What about the long term idea to support JITed nftables? A 128 bit immediate is required - maybe the biggest requirement for nftable support. Hagen