]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fm10k: NAPI polling routine must return actual work done
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 20 Jun 2016 17:39:32 +0000 (10:39 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:04:32 +0000 (22:04 -0800)
When fm10k_poll fully cleans rings it returns 0. This is incorrect as it
messes up the budget accounting in the core NAPI code. Fix this by
returning actual work done, capped at budget - 1 since the core doesn't
expect a return of the full budget when the driver modifies the NAPI
status.

Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Venkatesh Srinivas <venkateshs@google.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit e5fbfb78641ff0c5139ae665289ed9f91524265e)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_main.c

index f5a5bf910a889eec6897a8c1d6bb20c548328585..91b4e7951049fcf9ac131c01ab26c95c95fa6a8a 100644 (file)
@@ -1500,7 +1500,7 @@ static int fm10k_poll(struct napi_struct *napi, int budget)
        /* re-enable the q_vector */
        fm10k_qv_enable(q_vector);
 
-       return 0;
+       return min(work_done, budget - 1);
 }
 
 /**