From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH net-next 3/5] ebpf: Add sg_filter_run() Date: Tue, 11 Sep 2018 20:58:47 -0700 Message-ID: <20180912035846.3lwf4wrbqky7vpwe@ast-mbp> References: <1536694684-3200-1-git-send-email-tushar.n.dave@oracle.com> <1536694684-3200-4-git-send-email-tushar.n.dave@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net, santosh.shilimkar@oracle.com, jakub.kicinski@netronome.com, quentin.monnet@netronome.com, jiong.wang@netronome.com, sandipan@linux.vnet.ibm.com, john.fastabend@gmail.com, kafai@fb.com, rdna@fb.com, yhs@fb.com, netdev@vger.kernel.org, rds-devel@oss.oracle.com, sowmini.varadhan@oracle.com To: Tushar Dave Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:42501 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeILJBX (ORCPT ); Wed, 12 Sep 2018 05:01:23 -0400 Received: by mail-pl1-f195.google.com with SMTP id g23-v6so293721plq.9 for ; Tue, 11 Sep 2018 20:58:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1536694684-3200-4-git-send-email-tushar.n.dave@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Sep 11, 2018 at 09:38:02PM +0200, Tushar Dave wrote: > When sg_filter_run() is invoked it runs the attached eBPF > prog of type BPF_PROG_TYPE_SOCKET_SG_FILTER which deals with > struct scatterlist. > > Signed-off-by: Tushar Dave > Acked-by: Sowmini Varadhan > --- > include/linux/filter.h | 8 ++++++++ > include/uapi/linux/bpf.h | 6 ++++++ > net/core/filter.c | 35 +++++++++++++++++++++++++++++++++++ > tools/include/uapi/linux/bpf.h | 6 ++++++ > 4 files changed, 55 insertions(+) > > diff --git a/include/linux/filter.h b/include/linux/filter.h > index 6791a0a..ae664a9 100644 > --- a/include/linux/filter.h > +++ b/include/linux/filter.h > @@ -1113,4 +1113,12 @@ struct bpf_sock_ops_kern { > */ > }; > > +enum __socksg_action { > + __SOCKSG_PASS = 0, > + __SOCKSG_DROP, > + __SOCKSG_REDIRECT, what is this? I see no code that handles it either in this patch or in the later patches?!