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: <CAJ8uoz3HfjurV9BdCzscKyhRgHK_rTq4_Vqj2aupsVGHN8-HVg@mail.gmail.com>
Date:   Wed, 25 Nov 2020 09:23:03 +0100
From:   Magnus Karlsson <magnus.karlsson@...il.com>
To:     Björn Töpel <bjorn.topel@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>,
        Björn Töpel <bjorn.topel@...el.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        "Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Zhang, Qi Z" <qi.z.zhang@...el.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Maxim Mikityanskiy <maximmi@...dia.com>
Subject: Re: [PATCH bpf-next v3 10/10] samples/bpf: add option to set the
 busy-poll budget

On Thu, Nov 19, 2020 at 9:33 AM Björn Töpel <bjorn.topel@...il.com> wrote:
>
> From: Björn Töpel <bjorn.topel@...el.com>
>
> Support for the SO_BUSY_POLL_BUDGET setsockopt, via the batching
> option ('b').
>
> Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
> ---
>  samples/bpf/xdpsock_user.c | 5 +++++
>  1 file changed, 5 insertions(+)

Acked-by: Magnus Karlsson <magnus.karlsson@...el.com>

> diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
> index cb1eaee8a32b..deba623e9003 100644
> --- a/samples/bpf/xdpsock_user.c
> +++ b/samples/bpf/xdpsock_user.c
> @@ -1479,6 +1479,11 @@ static void apply_setsockopt(struct xsk_socket_info *xsk)
>         if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL,
>                        (void *)&sock_opt, sizeof(sock_opt)) < 0)
>                 exit_with_error(errno);
> +
> +       sock_opt = opt_batch_size;
> +       if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL_BUDGET,
> +                      (void *)&sock_opt, sizeof(sock_opt)) < 0)
> +               exit_with_error(errno);
>  }
>
>  int main(int argc, char **argv)
> --
> 2.27.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ