]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drivers: net: generalize napi_complete_done()
authorEric Dumazet <edumazet@google.com>
Thu, 8 Mar 2018 12:45:55 +0000 (18:15 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 9 Mar 2018 08:09:58 +0000 (09:09 +0100)
napi_complete_done() allows to opt-in for gro_flush_timeout,
added back in linux-3.19, commit 3b47d30396ba
("net: gro: add a per device gro flush timer")

This allows for more efficient GRO aggregation without
sacrifying latencies.

Picked up change for macb driver only.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/cadence/macb_main.c

index 7db2c9c21b4c9260d4125fc09644878601984e06..96f9e4f49708cb14840b0610db77dd3a4db47911 100644 (file)
@@ -1325,7 +1325,7 @@ static int macb_poll(struct napi_struct *napi, int budget)
 
        work_done = bp->macbgem_ops.mog_rx(bp, budget);
        if (work_done < budget) {
-               napi_complete(napi);
+               napi_complete_done(napi, work_done);
 
                /* Packets received while interrupts were disabled */
                status = macb_readl(bp, RSR);