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: <CAJ+HfNiU_jktREYAmeq1rVAokT6XEqUeYiRw+HEPv4tUnZFc8w@mail.gmail.com>
Date:   Wed, 6 May 2020 09:22:57 +0200
From:   Björn Töpel <bjorn.topel@...il.com>
To:     Maxim Mikityanskiy <maximmi@...lanox.com>
Cc:     "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        Björn Töpel <bjorn.topel@...el.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>
Subject: Re: [RFC PATCH bpf-next 04/13] xsk: introduce AF_XDP buffer
 allocation API

On Tue, 5 May 2020 at 16:28, Maxim Mikityanskiy <maximmi@...lanox.com> wrote:
>
[...]
> >
> > -     if (((d->addr + d->len) & q->chunk_mask) != (d->addr & q->chunk_mask) ||
> > -         d->options) {
> > +static inline bool xskq_cons_is_valid_desc(struct xsk_queue *q,
> > +                                        struct xdp_desc *d,
> > +                                        struct xdp_umem *umem)
> > +{
> > +     if (!xp_validate_desc(umem->pool, d)) {
>
> I did some performance debugging and came to conclusion that this
> function call is the culprit of the TX speed degradation that I
> experience. I still don't know if it's the only reason or not, but I
> clearly see a degradation when xskq_cons_is_valid_desc is not fully
> inlined, but calls a function. E.g., I've put the code that handles the
> aligned mode into a separate function in a different file, and it caused
> the similar speed decrease.
>

Thanks for looking in to, and finding this!

I'll make sure the xp_validate_desc() call is inlined for the next
revision.

A note to myself: I need to check the performance for an LLVM build
with LTO enabled.


Cheers,
Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ