net: renesas: rswitch: Use napi_gro_receive() in RX
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 8 Jun 2023 02:20:06 +0000 (11:20 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2023 18:49:18 +0000 (19:49 +0100)
This hardware can receive multiple frames so that using
napi_gro_receive() instead of netif_receive_skb() gets good
performance of RX.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/rswitch.c

index aace871..7bb0a6d 100644 (file)
@@ -729,7 +729,7 @@ static bool rswitch_rx(struct net_device *ndev, int *quota)
                }
                skb_put(skb, pkt_len);
                skb->protocol = eth_type_trans(skb, ndev);
-               netif_receive_skb(skb);
+               napi_gro_receive(&rdev->napi, skb);
                rdev->ndev->stats.rx_packets++;
                rdev->ndev->stats.rx_bytes += pkt_len;