Lines Matching full:budget

433 	u32 budget = tx_q->clean_budget;  in idpf_tx_singleq_clean()  local
493 /* update budget only if we did something */ in idpf_tx_singleq_clean()
494 budget--; in idpf_tx_singleq_clean()
505 } while (likely(budget)); in idpf_tx_singleq_clean()
526 return !!budget; in idpf_tx_singleq_clean()
532 * @budget: Used to determine if we are in netpoll
537 static bool idpf_tx_singleq_clean_all(struct idpf_q_vector *q_vec, int budget, in idpf_tx_singleq_clean_all() argument
544 budget_per_q = num_txq ? max(budget / num_txq, 1) : 0; in idpf_tx_singleq_clean_all()
958 * @budget: Total limit on number of packets to process
960 * Returns true if there's any budget left (e.g. the clean is finished)
962 static int idpf_rx_singleq_clean(struct idpf_rx_queue *rx_q, int budget) in idpf_rx_singleq_clean() argument
970 /* Process Rx packets bounded by budget */ in idpf_rx_singleq_clean()
971 while (likely(total_rx_pkts < (unsigned int)budget)) { in idpf_rx_singleq_clean()
1046 /* update budget accounting */ in idpf_rx_singleq_clean()
1064 return failure ? budget : (int)total_rx_pkts; in idpf_rx_singleq_clean()
1070 * @budget: Used to determine if we are in netpoll
1075 static bool idpf_rx_singleq_clean_all(struct idpf_q_vector *q_vec, int budget, in idpf_rx_singleq_clean_all() argument
1082 /* We attempt to distribute budget to each Rx queue fairly, but don't in idpf_rx_singleq_clean_all()
1083 * allow the budget to go below 1 because that would exit polling early. in idpf_rx_singleq_clean_all()
1085 budget_per_q = num_rxq ? max(budget / num_rxq, 1) : 0; in idpf_rx_singleq_clean_all()
1104 * @budget: budget provided by stack
1106 int idpf_vport_singleq_napi_poll(struct napi_struct *napi, int budget) in idpf_vport_singleq_napi_poll() argument
1113 /* Handle case where we are called by netpoll with a budget of 0 */ in idpf_vport_singleq_napi_poll()
1114 if (budget <= 0) { in idpf_vport_singleq_napi_poll()
1115 idpf_tx_singleq_clean_all(q_vector, budget, &work_done); in idpf_vport_singleq_napi_poll()
1117 return budget; in idpf_vport_singleq_napi_poll()
1120 clean_complete = idpf_rx_singleq_clean_all(q_vector, budget, in idpf_vport_singleq_napi_poll()
1122 clean_complete &= idpf_tx_singleq_clean_all(q_vector, budget, in idpf_vport_singleq_napi_poll()
1125 /* If work not completed, return budget and polling will return */ in idpf_vport_singleq_napi_poll()
1128 return budget; in idpf_vport_singleq_napi_poll()
1131 work_done = min_t(int, work_done, budget - 1); in idpf_vport_singleq_napi_poll()