Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1307056

Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH

From Martin KaFai Lau <kafai@fb.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH
Date 2016-01-12 08:50 +0100
Message-ID <qQ1Sh-6do-7@gated-at.bofh.it> (permalink)
References <qOrnQ-63O-5@gated-at.bofh.it> <qOrnR-63O-39@gated-at.bofh.it> <qOYD7-40S-5@gated-at.bofh.it> <qPXEZ-3xb-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jan 11, 2016 at 07:11:48PM -0800, Martin KaFai Lau wrote:
> On Sat, Jan 09, 2016 at 06:06:15PM +0800, Ming Lei wrote:
> > On Fri, Jan 8, 2016 at 6:35 AM, Martin KaFai Lau <kafai@fb.com> wrote:
> > > This patch adds BPFMAP_TYPE_PERCPU_HASH map type and its
> > > htab_map_ops implementation.
> > >
> > > Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> > > ---
> > >  include/uapi/linux/bpf.h |   1 +
> > >  kernel/bpf/hashtab.c     | 201 ++++++++++++++++++++++++++++++++++++++++++++++-
> > >  2 files changed, 201 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> > > index 8bed7f1..e4f8060 100644
> > > --- a/include/uapi/linux/bpf.h
> > > +++ b/include/uapi/linux/bpf.h
> > > @@ -81,6 +81,7 @@ enum bpf_map_type {
> > >         BPF_MAP_TYPE_ARRAY,
> > >         BPF_MAP_TYPE_PROG_ARRAY,
> > >         BPF_MAP_TYPE_PERF_EVENT_ARRAY,
> > > +       BPF_MAP_TYPE_PERCPU_HASH,
> > >  };
> > >
> > >  enum bpf_prog_type {
> > > diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
> > > index d55df8c..63f2945 100644
> > > --- a/kernel/bpf/hashtab.c
> > > +++ b/kernel/bpf/hashtab.c
> > > @@ -278,7 +278,7 @@ find_first_elem:
> > >  }
> > >
> > >  static struct htab_elem_common *htab_elem_common_alloc(struct bpf_htab *htab,
> > > -                                                       void *key)
> > > +                                                      void *key)
> >
> > better to not introduce the above change.
> What is the concern?
Sorry. I misread your comment. will fix this unnecessary indentation change.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-07 23:40 +0100
  [PATCH net-next 3/4] bpf: bpf_htab: Add syscall to iterate percpu value of a key Martin KaFai Lau <kafai@fb.com> - 2016-01-07 23:40 +0100
  [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-07 23:40 +0100
    Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-09 11:10 +0100
      Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-12 04:20 +0100
        Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-12 08:50 +0100
    Re: [PATCH net-next 2/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-09 11:40 +0100
  Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-08 08:00 +0100
    Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-09 01:50 +0100
      Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-09 10:50 +0100
        Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-10 03:40 +0100
          Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-11 03:30 +0100
            Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Martin KaFai Lau <kafai@fb.com> - 2016-01-11 23:40 +0100
              Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Ming Lei <tom.leiming@gmail.com> - 2016-01-12 06:50 +0100
                Re: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-12 07:10 +0100

csiph-web