imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: enetc: correct the value of ENETC_RXB_TRUESIZE
@ 2025-10-10  9:26 Wei Fang
  2025-10-10 12:48 ` Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Wei Fang @ 2025-10-10  9:26 UTC (permalink / raw)
  To: claudiu.manoil, vladimir.oltean, xiaoning.wang, andrew+netdev,
	davem, edumazet, kuba, pabeni, Frank.Li
  Cc: imx, netdev, linux-kernel

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-10-14 10:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).