Subject: [PATCH net-next v3 08/12] netdevsim: pass packets thru GRO on Rx

From: Jakub Kicinski <[email-masked]>
Date: Wed, 19 Nov 2025 18:10:20 -0800

To replace veth in software GRO testing with netdevsim we need
GRO support in netdevsim. Luckily we already have NAPI support
so this change is trivial (compared to veth).

Reviewed-by: Petr Machata <[email-masked]>
Reviewed-by: Willem de Bruijn <[email-masked]>
Signed-off-by: Jakub Kicinski <[email-masked]>
---
v2:
 - fix typo "compared"
v1: https://lore.kernel.org/[email-masked]
---
 drivers/net/netdevsim/netdev.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index fa1d97885caa..2b713db16cd0 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -433,13 +433,8 @@ static int nsim_rcv(struct nsim_rq *rq, int budget)
 		}
 
 		/* skb might be discard at netif_receive_skb, save the len */
-		skblen = skb->len;
-		skb_mark_napi_id(skb, &rq->napi);
-		ret = netif_receive_skb(skb);
-		if (ret == NET_RX_SUCCESS)
-			dev_dstats_rx_add(dev, skblen);
-		else
-			dev_dstats_rx_dropped(dev);
+		dev_dstats_rx_add(dev, skb->len);
+		napi_gro_receive(&rq->napi, skb);
 	}
 
 	nsim_start_peer_tx_queue(dev, rq);
-- 
2.51.1