]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: ravb: Enable SW IRQ Coalescing for GbEth
authorPaul Barker <paul.barker.ct@bp.renesas.com>
Tue, 4 Jun 2024 07:28:23 +0000 (08:28 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Jun 2024 07:59:58 +0000 (09:59 +0200)
Software IRQ Coalescing is required to improve network stack performance
in the RZ/G2L SoC family and the RZ/G3S SoC, i.e. the SoCs which use the
GbEth IP.

This patch gives the following improvements during testing with iperf3:

  * RZ/G2L:
    * TCP RX: same bandwidth with -6% CPU load (76% -> 71%)
    * UDP RX: same bandwidth with -10% CPU load (99% -> 89%)

  * RZ/G2UL:
    * UDP RX: +4200% bandwidth (1.23Mbps -> 53Mbps)

  * RZ/G3S:
    * UDP RX: +425% bandwidth (1.23Mbps -> 6.46Mbps)

The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL &
RZ/G3S) is particularly critical.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c

index 71de2a7aa27cdb01f6a43bc40e0e42e3ff36703a..6a7aa7dd17e6c33a21dc14be4b98a486c0521845 100644 (file)
@@ -1054,6 +1054,7 @@ struct ravb_hw_info {
        u32 rx_max_desc_use;
        u32 rx_desc_size;
        unsigned aligned_tx: 1;
+       unsigned coalesce_irqs:1;       /* Needs software IRQ coalescing */
 
        /* hardware features */
        unsigned internal_delay:1;      /* AVB-DMAC has internal delays */
index e8c3f48b213d986fc49c93d8e510d3a44ad22020..2c24cb0271af49603d6c380ba91192a5af67b771 100644 (file)
@@ -2667,6 +2667,7 @@ static const struct ravb_hw_info gbeth_hw_info = {
        .rx_max_desc_use = 4080,
        .rx_desc_size = sizeof(struct ravb_rx_desc),
        .aligned_tx = 1,
+       .coalesce_irqs = 1,
        .tx_counters = 1,
        .carrier_counters = 1,
        .half_duplex = 1,
@@ -2943,6 +2944,9 @@ static int ravb_probe(struct platform_device *pdev)
        if (info->nc_queues)
                netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll);
 
+       if (info->coalesce_irqs)
+               netdev_sw_irq_coalesce_default_on(ndev);
+
        /* Network device register */
        error = register_netdev(ndev);
        if (error)