5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Avi Weiss [ Upstream commit f3c790c34d228d46c4a05fe5d001d1bbea444e2b ] ena_rx_skb() selects the copybreak path based on the first RX descriptor's length without checking the number of descriptors. When a packet spans multiple descriptors, this copies only the first buffer into the skb and fails to recycle the remaining request IDs, while RX cleanup advances by the full descriptor count. Restrict copybreak to single-descriptor packets and apply the same restriction to the rx_copybreak_pkt statistic. Multi-descriptor packets then use the existing fragment-processing path. Discovered by comparing the in-tree ENA driver with Amazon's standalone ENA driver. Compiled with W=1 under x86_64 defconfig. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Avi Weiss Link: https://patch.msgid.link/20261109141343.920187-2-thnkslprpt@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 999aa8abc3e9a..be6c6e8c35b77 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -1502,7 +1502,7 @@ static struct sk_buff *ena_rx_skb(struct ena_ring *rx_ring, page_offset = rx_info->page_offset; buf_addr = page_address(rx_info->page) + page_offset; - if (len <= rx_ring->rx_copybreak) { + if (len <= rx_ring->rx_copybreak && likely(descs == 1)) { skb = ena_alloc_skb(rx_ring, NULL, len); if (unlikely(!skb)) return NULL; @@ -1808,7 +1808,8 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, skb_record_rx_queue(skb, rx_ring->qid); - if (rx_ring->ena_bufs[0].len <= rx_ring->rx_copybreak) + if (rx_ring->ena_bufs[0].len <= rx_ring->rx_copybreak && + ena_rx_ctx.descs == 1) rx_copybreak_pkt++; total_len += skb->len; -- 2.53.0