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] [day] [month] [year] [list]
Date:   Wed, 7 Dec 2022 16:41:24 +0100
From:   Eric Dumazet <edumazet@...gle.com>
To:     Tariq Toukan <ttoukan.linux@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Tariq Toukan <tariqt@...dia.com>, Wei Wang <weiwan@...gle.com>,
        netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 2/3] net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends
 on MAX_SKB_FRAGS

On Wed, Dec 7, 2022 at 4:14 PM Tariq Toukan <ttoukan.linux@...il.com> wrote:
>

> So what you're saying is, if all the elements of
> MLX4_TX_BOUNCE_BUFFER_SIZE co-exist together for a TX descriptor, then
> the actual "headers" part can go only up to 208 (similar to today), not
> the whole 256 (as the new define documentation says).
>
> This keeps the current behavior, but makes the code a bit more confusing.
>
> IMO it is cleaner to have MLX4_TX_BOUNCE_BUFFER_SIZE explicitly defined
> as a multiple of TXBB_SIZE in the first place. This way, both the
> allocation size and the desc size limit will be in perfect sync, without
> having assumptions on the amount X lost in the division.
>
> How about the below, to keep today's values for the defines?
>
> #define MLX4_TX_BOUNCE_BUFFER_SIZE \
>         ALIGN(208 + CTRL_SIZE + DS_SIZE + \
>               MAX_SKB_FRAGS * DS_SIZE, TXBB_SIZE)

I already sent a v2, with:

+#define MLX4_TX_BOUNCE_BUFFER_SIZE \
+       ALIGN(256 + CTRL_SIZE + DS_SIZE + MAX_SKB_FRAGS * DS_SIZE, TXBB_SIZE)
+

Please take a look, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ