gmac_rx() charges only the received payload length for each page fragment attached to an skb. Each fragment pins a complete free queue DMA buffer, so short packets understate their memory use to GRO and socket accounting. Charge the full posted fragment size for every attached fragment. The skb already accounts for its own head separately. The issue was found by reviewing the RX fragment accounting. The series was tested on a D-Link DIR-685 with media playback and ksmbd transfers under ping load. Signed-off-by: Linus Walleij --- drivers/net/ethernet/cortina/gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index d23b625e4760..1089cd0a4b07 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -1907,7 +1907,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget, skb_fill_page_desc(skb, frag_nr, page, page_offs, frag_len); skb->len += frag_len; skb->data_len += frag_len; - skb->truesize += frag_len; + skb->truesize += freeq_frag_len; frag_nr++; if (!(word3.bits32 & EOF_BIT)) -- 2.56.1