BPF Archive on lore.kernel.org
 help / color / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Martin KaFai Lau <kafai@fb.com>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>,
	Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next 0/3] bpf: Allow inner map with different max_entries
Date: Thu, 21 May 2020 16:16:18 -0700
Message-ID: <20200521231618.x3s45pttduqijbjv@ast-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <CAEf4BzZyhT6D6F2A+cN6TKvLFoH5GU5QVEVW7ZkG+KQRgJC-1w@mail.gmail.com>

On Thu, May 21, 2020 at 04:10:36PM -0700, Andrii Nakryiko wrote:
> > > 4. Then for size check change, again, it's really much simpler and
> > > cleaner just to have a special case in check in bpf_map_meta_equal for
> > > cases where map size matters.
> > It may be simpler but not necessary less fragile for future map type.
> >
> > I am OK for removing patch 1 and just check for a specific
> > type in patch 2 but I think it is fragile for future map
> > type IMO.
> Well, if we think that the good default needs to be to check size,
> then similar to above, explicitly list stuff that *does not* follow
> the default, i.e., maps that don't want max_elements verification. My
> point still stands.

I think consoldating map properties in bpf_types.h is much cleaner
and less error prone.
I'd only like to tweak the macro in patch 1 to avoid explicit ", 0)".
Can BPF_MAP_TYPE() macro stay as-is and additional macro introduced
for maps with properties ? BPF_MAP_TYPE_FL() ?
Or do some macro magic that the same macro can be used with 2 and 3 args?

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 19:17 Martin KaFai Lau
2020-05-21 19:17 ` [PATCH bpf-next 1/3] bpf: Clean up inner map type check Martin KaFai Lau
2020-05-21 19:18 ` [PATCH bpf-next 2/3] bpf: Relax the max_entries check for inner map Martin KaFai Lau
2020-05-21 19:18 ` [PATCH bpf-next 3/3] bpf: selftests: Add test for different inner map size Martin KaFai Lau
2020-05-21 22:39 ` [PATCH bpf-next 0/3] bpf: Allow inner map with different max_entries Andrii Nakryiko
2020-05-21 22:59   ` Martin KaFai Lau
2020-05-21 23:10     ` Andrii Nakryiko
2020-05-21 23:16       ` Alexei Starovoitov [this message]
2020-05-22  0:06         ` Martin KaFai Lau
2020-05-26 17:47         ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200521231618.x3s45pttduqijbjv@ast-mbp.dhcp.thefacebook.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git