All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Wei Fang <wei.fang@nxp.com>, claudiu.manoil@nxp.com
Cc: xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, Frank.Li@nxp.com, imx@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: enetc: correct the value of ENETC_RXB_TRUESIZE
Date: Fri, 10 Oct 2025 15:48:46 +0300	[thread overview]
Message-ID: <20251010124846.uzza7evcea3zs67a@skbuf> (raw)
In-Reply-To: <20251010092608.2520561-1-wei.fang@nxp.com>

On Fri, Oct 10, 2025 at 05:26:08PM +0800, Wei Fang wrote:
> ENETC_RXB_TRUESIZE indicates the size of half a page, but the page size
> is adjustable, for ARM64 platform, the PAGE_SIZE can be 4K, 16K and 64K,
> so a fixed value '2048' is not correct when the PAGE_SIZE is 16K or 64K.
> 
> Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers")
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
>  drivers/net/ethernet/freescale/enetc/enetc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h
> index 0ec010a7d640..f279fa597991 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc.h
> +++ b/drivers/net/ethernet/freescale/enetc/enetc.h
> @@ -76,7 +76,7 @@ struct enetc_lso_t {
>  #define ENETC_LSO_MAX_DATA_LEN		SZ_256K
>  
>  #define ENETC_RX_MAXFRM_SIZE	ENETC_MAC_MAXFRM_SIZE
> -#define ENETC_RXB_TRUESIZE	2048 /* PAGE_SIZE >> 1 */
> +#define ENETC_RXB_TRUESIZE	(PAGE_SIZE >> 1)
>  #define ENETC_RXB_PAD		NET_SKB_PAD /* add extra space if needed */
>  #define ENETC_RXB_DMA_SIZE	\
>  	(SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - ENETC_RXB_PAD)
> -- 
> 2.34.1
>

I wonder why 2048 was preferred, even though PAGE_SIZE >> 1 was in a comment.
Claudiu, do you remember?

  reply	other threads:[~2025-10-10 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10  9:26 [PATCH net] net: enetc: correct the value of ENETC_RXB_TRUESIZE Wei Fang
2025-10-10 12:48 ` Vladimir Oltean [this message]
2025-10-10 16:23   ` Claudiu Manoil
2025-10-14  2:20     ` Wei Fang
2025-10-14  9:32       ` Claudiu Manoil
2025-10-14 10:00         ` Wei Fang
2025-10-10 12:49 ` Vladimir Oltean
2025-10-10 13:32   ` Wei Fang
2025-10-13 23:47 ` Jakub Kicinski

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=20251010124846.uzza7evcea3zs67a@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.