From: Markus Elfring <Markus.Elfring@web.de>
To: Himanshu Mittal <h-mittal1@ti.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
MD Danish Anwar <danishanwar@ti.com>,
Meghana Malladi <m-malladi@ti.com>,
Paolo Abeni <pabeni@redhat.com>,
prajith@ti.com, Pratheesh Gangadhar <pratheesh@ti.com>,
Simon Horman <horms@kernel.org>, Sriramakrishnan <srk@ti.com>,
Roger Quadros <rogerq@kernel.org>,
Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH net v3] net: ti: icssg-prueth: Fix buffer allocation for ICSSG
Date: Thu, 17 Jul 2025 14:56:15 +0200 [thread overview]
Message-ID: <4c677fdb-e6d6-4961-b911-78aaa28130e6@web.de> (raw)
In-Reply-To: <20250717094220.546388-1-h-mittal1@ti.com>
…
> +++ 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
next prev parent reply other threads:[~2025-07-17 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 9:42 Himanshu Mittal
2025-07-17 12:56 ` Markus Elfring [this message]
2025-07-18 14:32 ` Simon Horman
2025-07-18 18:30 ` [v3] " Markus Elfring
2025-07-18 14:27 ` [PATCH net v3] " Simon Horman
2025-07-19 0:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c677fdb-e6d6-4961-b911-78aaa28130e6@web.de \
--to=markus.elfring@web.de \
--cc=andrew+netdev@lunn.ch \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=h-mittal1@ti.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-malladi@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prajith@ti.com \
--cc=pratheesh@ti.com \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®