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]
Date:   Wed, 08 Dec 2021 16:54:05 -0800
From:   John Fastabend <john.fastabend@...il.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: RE: [PATCH bpf-next 0/8] Add support for transmitting packets using
 XDP in bpf_prog_run()

Toke Høiland-Jørgensen wrote:
> This series adds support for transmitting packets using XDP in
> bpf_prog_run(), by enabling the xdp_do_redirect() callback so XDP programs
> can perform "real" redirects to devices or maps, using an opt-in flag when
> executing the program.
> 
> The primary use case for this is testing the redirect map types and the
> ndo_xdp_xmit driver operation without generating external traffic. But it
> turns out to also be useful for creating a programmable traffic generator.
> The last patch adds a sample traffic generator to bpf/samples, which
> can transmit up to 11.5 Mpps/core on my test machine.
> 
> To transmit the frames, the new mode instantiates a page_pool structure in
> bpf_prog_run() and initialises the pages with the data passed in by
> userspace. These pages can then be redirected using the normal redirection
> mechanism, and the existing page_pool code takes care of returning and
> recycling them. The setup is optimised for high performance with a high
> number of repetitions to support stress testing and the traffic generator
> use case; see patch 6 for details.
> 
> The series is structured as follows: Patches 1-2 adds a few features to
> page_pool that are needed for the usage in bpf_prog_run(). Similarly,
> patches 3-5 performs a couple of preparatory refactorings of the XDP
> redirect and memory management code. Patch 6 adds the support to
> bpf_prog_run() itself, patch 7 adds a selftest, and patch 8 adds the
> traffic generator example to samples/bpf.

Overall looks pretty good. Couple questions in the series though.

Thanks!
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ