]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: bcmasp: Utilize napi_complete_done() return value
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Wed, 11 Jun 2025 21:27:29 +0000 (14:27 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Jun 2025 01:26:20 +0000 (18:26 -0700)
Make use of the return value from napi_complete_done(). This allows
users to use the gro_flush_timeout and napi_defer_hard_irqs sysfs
attributes for configuring software interrupt coalescing.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20250611212730.252342-2-florian.fainelli@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

index 0d61b8580d72b083a7c2297a58fe99d03e9dd8c9..7dc28166d3373f67bf265a21ed518b2887d3becf 100644 (file)
@@ -605,10 +605,8 @@ next:
 
        bcmasp_intf_rx_desc_write(intf, intf->rx_edpkt_dma_read);
 
-       if (processed < budget) {
-               napi_complete_done(&intf->rx_napi, processed);
+       if (processed < budget && napi_complete_done(&intf->rx_napi, processed))
                bcmasp_enable_rx_irq(intf, 1);
-       }
 
        return processed;
 }