From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH v6 net-next 1/4] net: flow_dissector: avoid multiple calls in eBPF Date: Fri, 27 Jun 2014 12:19:00 +0200 Message-ID: <53AD4514.9040708@redhat.com> References: <1398882591-30422-1-git-send-email-chema@google.com> <1401389758-13252-1-git-send-email-chema@google.com> <5387C8AD.6000909@redhat.com> <538C6FD8.9040305@redhat.com> <538D884E.5030007@redhat.com> <538EDE1A.8060305@redhat.com> <53A9337F.50707@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexei Starovoitov , Ingo Molnar , Steven Rostedt , Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , Kees Cook , David Miller , Eric Dumazet , Network Development , LKML To: Chema Gonzalez Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 06/26/2014 12:00 AM, Chema Gonzalez wrote: ... > There's still the problem of whether we want to obsolete classic BPF > in the kernel before the tools (libpcap mainly) accept eBPF. This can > take a lot. > > Finally, what's the user's CLI interface you have in mind? Right now, > tcpdump expressions are very handy: I know I can pass "ip[2:2] == > 1500" or "(tcp[13] & 0x03)" to any libpcap-based application. This is > very handy to log into a machine, and quickly run tcpdump to get the > packets I'm interested on. What would be the model for using C-- eBPF > filters in the same manner? Yes, imho, it's a valid question to ask. I think there are a couple of possibilities for libpcap/tcpdump from a user point of view (note, I don't strictly think it's the _only_ main user though): 1) iff a llvm and/or gcc backend gets merged from the compiler side, one could add a cli interface to run the generated opcodes from a file for advanced filters while perhaps classic BPF continues to be supported via its high-level filter expressions; 2) there could be a Linux-only compiler in libpcap that translates and makes use of full eBPF (though significantly more effort to implement); 3) libpcap continues to use classic BPF as it's currently doing.