]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
authorChen Lin <chen45464546@163.com>
Wed, 8 Jun 2022 12:46:53 +0000 (20:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Jun 2022 03:37:27 +0000 (20:37 -0700)
commita840da6e83f86c532720d2c6c3f5cdb7c5d6d577
treec0a4998716427a9dd92107daf1da24afa4b9ffcd
parent943f7934a3b3b217e2f8ac0c5d517983598e4c07
net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag

When rx_flag == MTK_RX_FLAGS_HWLRO,
rx_data_len = MTK_MAX_LRO_RX_LENGTH(4096 * 3) > PAGE_SIZE.
netdev_alloc_frag is for alloction of page fragment only.
Reference to other drivers and Documentation/vm/page_frags.rst

Branch to use __get_free_pages when ring->frag_size > PAGE_SIZE.

Signed-off-by: Chen Lin <chen45464546@163.com>
Link: https://lore.kernel.org/r/1654692413-2598-1-git-send-email-chen45464546@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c