Message ID | 20250127175159.1788246-1-florian.fainelli@broadcom.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 752e5fcc2e77358936d36ef8e522d6439372e201 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2] bgmac: reduce max frame size to support just MTU 1500 | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 27 Jan 2025 09:51:59 -0800 you wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > bgmac allocates new replacement buffer before handling each received > frame. Allocating & DMA-preparing 9724 B each time consumes a lot of CPU > time. Ideally bgmac should just respect currently set MTU but it isn't > the case right now. For now just revert back to the old limited frame > size. > > [...] Here is the summary with links: - [net,v2] bgmac: reduce max frame size to support just MTU 1500 https://git.kernel.org/netdev/net/c/752e5fcc2e77 You are awesome, thank you!
diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h index d73ef262991d..6fee9a41839c 100644 --- a/drivers/net/ethernet/broadcom/bgmac.h +++ b/drivers/net/ethernet/broadcom/bgmac.h @@ -328,8 +328,7 @@ #define BGMAC_RX_FRAME_OFFSET 30 /* There are 2 unused bytes between header and real data */ #define BGMAC_RX_BUF_OFFSET (NET_SKB_PAD + NET_IP_ALIGN - \ BGMAC_RX_FRAME_OFFSET) -/* Jumbo frame size with FCS */ -#define BGMAC_RX_MAX_FRAME_SIZE 9724 +#define BGMAC_RX_MAX_FRAME_SIZE 1536 #define BGMAC_RX_BUF_SIZE (BGMAC_RX_FRAME_OFFSET + BGMAC_RX_MAX_FRAME_SIZE) #define BGMAC_RX_ALLOC_SIZE (SKB_DATA_ALIGN(BGMAC_RX_BUF_SIZE + BGMAC_RX_BUF_OFFSET) + \ SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))