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: <4c677fdb-e6d6-4961-b911-78aaa28130e6@web.de>
Date: Thu, 17 Jul 2025 14:56:15 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Himanshu Mittal <h-mittal1@...com>, netdev@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, MD Danish Anwar <danishanwar@...com>,
 Meghana Malladi <m-malladi@...com>, Paolo Abeni <pabeni@...hat.com>,
 prajith@...com, Pratheesh Gangadhar <pratheesh@...com>,
 Simon Horman <horms@...nel.org>, Sriramakrishnan <srk@...com>,
 Roger Quadros <rogerq@...nel.org>, Vignesh Raghavendra <vigneshr@...com>
Subject: Re: [PATCH net v3] net: ti: icssg-prueth: Fix buffer allocation for
 ICSSG

…
> +++ b/drivers/net/ethernet/ti/icssg/icssg_config.c
> @@ -288,8 +288,12 @@ static int prueth_fw_offload_buffer_setup(struct prueth_emac *emac)
>  	int i;
>  
>  	addr = lower_32_bits(prueth->msmcram.pa);
> -	if (slice)
> -		addr += PRUETH_NUM_BUF_POOLS * PRUETH_EMAC_BUF_POOL_SIZE;
> +	if (slice) {
> +		if (prueth->pdata.banked_ms_ram)
> +			addr += MSMC_RAM_BANK_SIZE;
> +		else
> +			addr += PRUETH_SW_TOTAL_BUF_SIZE_PER_SLICE;
> +	}
…

Would you like to use the following code variant?

	if (slice)
		addr += ( prueth->pdata.banked_ms_ram
			? MSMC_RAM_BANK_SIZE
			: PRUETH_SW_TOTAL_BUF_SIZE_PER_SLICE);


Can the usage of the conditional operator be extended another bit
(also for the function “prueth_emac_buffer_setup” for example)?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ