lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa88130d-91d4-981d-04b0-b2d20c244437@fb.com>
Date:   Mon, 8 Jul 2019 16:47:31 +0000
From:   Yonghong Song <yhs@...com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>,
        "Daniel Borkmann" <daniel@...earbox.net>
CC:     Alexei Starovoitov <ast@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        "Jesper Dangaard Brouer" <brouer@...hat.com>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Björn Töpel <bjorn.topel@...il.com>
Subject: Re: [PATCH bpf-next v3 3/6] xdp: Add devmap_hash map type for looking
 up devices by hashed index



On 7/8/19 3:55 AM, Toke Høiland-Jørgensen wrote:
> From: Toke Høiland-Jørgensen <toke@...hat.com>
> 
> A common pattern when using xdp_redirect_map() is to create a device map
> where the lookup key is simply ifindex. Because device maps are arrays,
> this leaves holes in the map, and the map has to be sized to fit the
> largest ifindex, regardless of how many devices actually are actually
> needed in the map.
> 
> This patch adds a second type of device map where the key is looked up
> using a hashmap, instead of being used as an array index. This allows maps
> to be densely packed, so they can be smaller.
> 
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>

Acked-by: Yonghong Song <yhs@...com>

> ---
>   include/linux/bpf.h        |    7 ++
>   include/linux/bpf_types.h  |    1
>   include/trace/events/xdp.h |    3 -
>   include/uapi/linux/bpf.h   |    1
>   kernel/bpf/devmap.c        |  194 ++++++++++++++++++++++++++++++++++++++++++++
>   kernel/bpf/verifier.c      |    2
>   net/core/filter.c          |    9 ++
>   7 files changed, 214 insertions(+), 3 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ