From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Alexei Starovoitov <alexei.starovoitov@gmail•com>
Cc: "Daniel Borkmann" <daniel@iogearbox•net>,
"Alexei Starovoitov" <ast@kernel•org>,
"Network Development" <netdev@vger•kernel.org>,
"David Miller" <davem@davemloft•net>,
"Jesper Dangaard Brouer" <brouer@redhat•com>,
"Jakub Kicinski" <jakub.kicinski@netronome•com>,
"Björn Töpel" <bjorn.topel@gmail•com>,
"Yonghong Song" <yhs@fb•com>
Subject: Re: [PATCH bpf-next v5 0/6] xdp: Add devmap_hash map type
Date: Thu, 08 Aug 2019 21:30:39 +0200 [thread overview]
Message-ID: <87k1bnsbds.fsf@toke.dk> (raw)
In-Reply-To: <CAADnVQJpYeQ68V5BE2r3BhbraBh7G8dSd8zknFUJxtW4GwNkuA@mail.gmail.com>
Alexei Starovoitov <alexei.starovoitov@gmail•com> writes:
> On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen <toke@redhat•com> wrote:
>>
>> This series adds a new map type, devmap_hash, that works like the existing
>> devmap type, but using a hash-based indexing scheme. This is useful for the use
>> case where a devmap is indexed by ifindex (for instance for use with the routing
>> table lookup helper). For this use case, the regular devmap needs to be sized
>> after the maximum ifindex number, not the number of devices in it. A hash-based
>> indexing scheme makes it possible to size the map after the number of devices it
>> should contain instead.
>>
>> This was previously part of my patch series that also turned the regular
>> bpf_redirect() helper into a map-based one; for this series I just pulled out
>> the patches that introduced the new map type.
>>
>> Changelog:
>>
>> v5:
>>
>> - Dynamically set the number of hash buckets by rounding up max_entries to the
>> nearest power of two (mirroring the regular hashmap), as suggested by Jesper.
>
> fyi I'm waiting for Jesper to review this new version.
Ping Jesper? :)
-Toke
next prev parent reply other threads:[~2019-08-08 19:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 16:06 [PATCH bpf-next v5 0/6] xdp: Add devmap_hash map type Toke Høiland-Jørgensen
2019-07-26 16:06 ` [PATCH bpf-next v5 1/6] include/bpf.h: Remove map_insert_ctx() stubs Toke Høiland-Jørgensen
2019-07-29 15:42 ` Jesper Dangaard Brouer
2019-07-26 16:06 ` [PATCH bpf-next v5 2/6] xdp: Refactor devmap allocation code for reuse Toke Høiland-Jørgensen
2019-07-29 16:02 ` Jesper Dangaard Brouer
2019-07-26 16:06 ` [PATCH bpf-next v5 3/6] xdp: Add devmap_hash map type for looking up devices by hashed index Toke Høiland-Jørgensen
2019-07-29 16:16 ` Jesper Dangaard Brouer
2019-07-26 16:06 ` [PATCH bpf-next v5 4/6] tools/include/uapi: Add devmap_hash BPF map type Toke Høiland-Jørgensen
2019-07-29 16:16 ` Jesper Dangaard Brouer
2019-07-26 16:06 ` [PATCH bpf-next v5 5/6] tools/libbpf_probes: Add new devmap_hash type Toke Høiland-Jørgensen
2019-07-29 16:17 ` Jesper Dangaard Brouer
2019-07-26 16:06 ` [PATCH bpf-next v5 6/6] tools: Add definitions for devmap_hash map type Toke Høiland-Jørgensen
2019-07-29 16:17 ` Jesper Dangaard Brouer
2019-07-27 2:26 ` [PATCH bpf-next v5 0/6] xdp: Add " Alexei Starovoitov
2019-07-29 20:57 ` Alexei Starovoitov
2019-08-08 19:30 ` Toke Høiland-Jørgensen [this message]
2019-08-08 19:57 ` Y Song
2019-08-08 20:05 ` Jesper Dangaard Brouer
2019-08-09 18:45 ` Toke Høiland-Jørgensen
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1bnsbds.fsf@toke.dk \
--to=toke@redhat$(echo .)com \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=ast@kernel$(echo .)org \
--cc=bjorn.topel@gmail$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=jakub.kicinski@netronome$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yhs@fb$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox