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: <aHe8NslImAs76-u5@shredder>
Date: Wed, 16 Jul 2025 17:50:30 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Joseph Huang <joseph.huang.2024@...il.com>
Cc: Joseph Huang <Joseph.Huang@...min.com>, netdev@...r.kernel.org,
	Nikolay Aleksandrov <razor@...ckwall.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Vladimir Oltean <vladimir.oltean@....com>,
	Tobias Waldekranz <tobias@...dekranz.com>,
	Florian Fainelli <f.fainelli@...il.com>, bridge@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net] net: bridge: Do not offload IGMP/MLD messages

On Wed, Jul 16, 2025 at 10:29:55AM -0400, Joseph Huang wrote:
> Talking about these packets being low rate, should I add unlikely() like so:

I don't think it's needed and probably not measurable in most (all?)
deployments. The entire thing is hidden behind static_branch_unlikely().
It just seemed weird to perform the checks about the Tx offload and only
later check if it's even a packet for which you want this offload.

> 
> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> index 95d7355a0407..9a910cf0256e 100644
> --- a/net/bridge/br_switchdev.c
> +++ b/net/bridge/br_switchdev.c
> @@ -17,6 +17,9 @@ static bool nbp_switchdev_can_offload_tx_fwd(const struct
> net_bridge_port *p,
>   	if (!static_branch_unlikely(&br_switchdev_tx_fwd_offload))
>   		return false;
> 
> +	if (unlikely(br_multicast_igmp_type(skb)))
> +		return false;
> +
>   	return (p->flags & BR_TX_FWD_OFFLOAD) &&
>   	       (p->hwdom != BR_INPUT_SKB_CB(skb)->src_hwdom);
>   }
> 
> Thanks,
> Joseph

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ