mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 00:56:12 +07:00
net: mvneta: rely on MVNETA_MAX_RX_BUF_SIZE for pkt split in mvneta_swbm_rx_frame()
In order to easily change the rx buffer size, rely on MVNETA_MAX_RX_BUF_SIZE instead of PAGE_SIZE in mvneta_swbm_rx_frame routine for rx buffer split. Currently this is not an issue since we set MVNETA_MAX_RX_BUF_SIZE to PAGE_SIZE - MVNETA_SKB_PAD but it is a good to have to configure a different rx buffer size. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8c5c49a6a0
commit
6eb8b7fbe3
@ -330,7 +330,6 @@
|
||||
#define MVNETA_SKB_HEADROOM ALIGN(max(NET_SKB_PAD, XDP_PACKET_HEADROOM), 8)
|
||||
#define MVNETA_SKB_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info) + \
|
||||
MVNETA_SKB_HEADROOM))
|
||||
#define MVNETA_SKB_SIZE(len) (SKB_DATA_ALIGN(len) + MVNETA_SKB_PAD)
|
||||
#define MVNETA_MAX_RX_BUF_SIZE (PAGE_SIZE - MVNETA_SKB_PAD)
|
||||
|
||||
#define IS_TSO_HEADER(txq, addr) \
|
||||
@ -2236,7 +2235,7 @@ mvneta_swbm_rx_frame(struct mvneta_port *pp,
|
||||
enum dma_data_direction dma_dir;
|
||||
struct skb_shared_info *sinfo;
|
||||
|
||||
if (MVNETA_SKB_SIZE(rx_desc->data_size) > PAGE_SIZE) {
|
||||
if (rx_desc->data_size > MVNETA_MAX_RX_BUF_SIZE) {
|
||||
len = MVNETA_MAX_RX_BUF_SIZE;
|
||||
data_len += len;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user