From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch iproute2 2/2] tc: add support for BPF based actions Date: Wed, 7 Jan 2015 20:52:33 +0100 Message-ID: <20150107195233.GA1898@nanopsycho.orion> References: <1420649035-9522-1-git-send-email-jiri@resnulli.us> <1420649244-9574-1-git-send-email-jiri@resnulli.us> <1420649244-9574-2-git-send-email-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev , David Miller , Jamal Hadi Salim , Stephen Hemminger To: Cong Wang Return-path: Received: from mail-wi0-f177.google.com ([209.85.212.177]:50045 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608AbbAGTwf (ORCPT ); Wed, 7 Jan 2015 14:52:35 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so2406655wiw.4 for ; Wed, 07 Jan 2015 11:52:34 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Wed, Jan 07, 2015 at 07:50:47PM CET, cwang@twopensource.com wrote: >On Wed, Jan 7, 2015 at 8:47 AM, Jiri Pirko wrote: >> + fprintf(stderr, "Usage: ... bpf ...\n"); >> + fprintf(stderr, "\n"); >> + fprintf(stderr, " [inline]: run bytecode BPF_BYTECODE\n"); >> + fprintf(stderr, " [from file]: run bytecode-file FILE\n"); >> + fprintf(stderr, "\n"); >> + fprintf(stderr, "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n"); >> + fprintf(stderr, " c,t,f,k and s are decimals; s denotes number of 4-tuples\n"); >> + fprintf(stderr, "Where FILE points to a file containing the BPF_BYTECODE string\n"); >> + fprintf(stderr, "\nACTION_SPEC := ... look at individual actions\n"); >> + fprintf(stderr, "NOTE: CLASSID is parsed as hexadecimal input.\n"); > >Can we just use BPF transparently for gact? Why to squash it there? I think it is much clearer to do this separatelly. >It is never user-friendly to >use this kind of bytecode even though I know there is a tool to "compile" >BPF. Please see cls_bpf. It's already in-tree for some time. act_bpf just completes this.