]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: bcmgenet: use napi_complete_done return value
authorZak Kemble <zakkemble@gmail.com>
Tue, 10 Jun 2025 22:04:02 +0000 (23:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Jun 2025 00:41:42 +0000 (17:41 -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: Zak Kemble <zakkemble@gmail.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250610220403.935-2-zakkemble@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index fa0077bc67b7e5483c78a39319622ac64d2ecd74..cc9bdd24432821d94cd642842f94caf17fae6378 100644 (file)
@@ -2472,10 +2472,8 @@ static int bcmgenet_rx_poll(struct napi_struct *napi, int budget)
 
        work_done = bcmgenet_desc_rx(ring, budget);
 
-       if (work_done < budget) {
-               napi_complete_done(napi, work_done);
+       if (work_done < budget && napi_complete_done(napi, work_done))
                bcmgenet_rx_ring_int_enable(ring);
-       }
 
        if (ring->dim.use_dim) {
                dim_update_sample(ring->dim.event_ctr, ring->dim.packets,