Re: [PATCH net-next] etherdevice: Optimize is_broadcast_ether_addr

From: Jakub Kicinski
Date: Thu Jun 13 2024 - 20:05:30 EST


On Thu, 13 Jun 2024 15:34:41 +0800 Qingfang Deng wrote:
> Like is_zero_ether_addr, is_broadcast_ether_addr can also be optimized
> by using a 32-bit load if CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set.
> Sign extension is used to populate the upper 16-bit of the 16-bit load.

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...
--
pw-bot: cr