[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba25cca0-adbf-435b-8c21-f03c567045b1@amd.com>
Date: Thu, 11 Sep 2025 12:13:10 +0530
From: "Karumanchi, Vineeth" <vineeth@....com>
To: Théo Lebrun <theo.lebrun@...tlin.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Harini Katakam <harini.katakam@...inx.com>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH net v5 3/5] net: macb: move ring size computation to
functions
Hi Theo,
On 9/10/2025 9:45 PM, Théo Lebrun wrote:
<...>
> #define DEFAULT_TX_RING_SIZE 512 /* must be power of 2 */
> #define MIN_TX_RING_SIZE 64
> #define MAX_TX_RING_SIZE 4096
> -#define TX_RING_BYTES(bp) (macb_dma_desc_get_size(bp) \
> - * (bp)->tx_ring_size)
>
> /* level of occupied TX descriptors under which we wake up TX process */
> #define MACB_TX_WAKEUP_THRESH(bp) (3 * (bp)->tx_ring_size / 4)
> @@ -2470,11 +2466,20 @@ static void macb_free_rx_buffers(struct macb *bp)
> }
> }
>
> +static unsigned int macb_tx_ring_size_per_queue(struct macb *bp)
> +{
> + return macb_dma_desc_get_size(bp) * bp->tx_ring_size + bp-
> >tx_bd_rd_prefetch;
> +}
> +
> +static unsigned int macb_rx_ring_size_per_queue(struct macb *bp)
> +{
> + return macb_dma_desc_get_size(bp) * bp->rx_ring_size + bp-
> >rx_bd_rd_prefetch;
> +}
> +
it would be good to have these functions as inline.
May be as a separate patch.
<...>
--
🙏 Vineeth
Powered by blists - more mailing lists