Lines Matching refs:budget
211 * Returns true if there's any budget left (e.g. the clean is finished)
220 unsigned int budget = IAVF_DEFAULT_IRQ_WORK;
298 /* update budget accounting */
299 budget--;
300 } while (likely(budget));
319 if (budget &&
346 return !!budget;
1128 * @budget: Total limit on number of packets to process
1137 static int iavf_clean_rx_irq(struct iavf_ring *rx_ring, int budget)
1144 while (likely(total_rx_packets < (unsigned int)budget)) {
1240 /* update budget accounting */
1254 return failure ? budget : (int)total_rx_packets;
1357 * @budget: amount of work driver is allowed to do this pass, in packets
1363 int iavf_napi_poll(struct napi_struct *napi, int budget)
1380 * budget and be more aggressive about cleaning up the Tx descriptors.
1383 if (!iavf_clean_tx_irq(vsi, ring, budget)) {
1391 /* Handle case where we are called by netpoll with a budget of 0 */
1392 if (budget <= 0)
1395 /* We attempt to distribute budget to each Rx queue fairly, but don't
1396 * allow the budget to go below 1 because that would exit polling early.
1398 budget_per_ring = max(budget/q_vector->num_ringpairs, 1);
1409 /* If work not completed, return budget and polling will return */
1427 /* Return budget-1 so that polling stops */
1428 return budget - 1;
1435 return budget;
1447 return min_t(int, work_done, budget - 1);