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]
Message-ID: <CALW65jay2+n_FhREhikVWoUEMQ2mytbrmQ9UzhjtCEv1gmtvQA@mail.gmail.com>
Date: Tue, 18 Jun 2024 14:47:31 +0800
From: Qingfang Deng <dqfext@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Joe Perches <joe@...ches.com>, Qingfang Deng <qingfang.deng@...lower.com.cn>
Subject: Re: [PATCH net-next] etherdevice: Optimize is_broadcast_ether_addr

Hi Jakub,

On Fri, Jun 14, 2024 at 8:05 AM Jakub Kicinski <kuba@...nel.org> wrote:
> Can you provide more context on why it's beneficial. I mean, there's a
> lot of code in the kernel one could micro-optimize...
>
> Show us the assembly, cycle counts, where it's used on fast paths...

is_broadcast_ether_addr is used in bridge forwarding fast paths
(br_dev_xmit, br_multicast_flood, br_handle_frame_finish), and often
in combination with is_multicast_ether_addr.
Since commit d54385ce68cd ("etherdev: Process is_multicast_ether_addr
at same size as other operations"), is_multicast_ether_addr already
does a 32-bit load. We can avoid duplicate loads by applying the same
approach to is_broadcast_ether_addr and save a few instructions.
Tested with x86_64, aarch64 and RISC-V compilers.

> --
> pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ