Lines Matching refs:budget
129 int cpsw_tx_mq_poll(struct napi_struct *napi_tx, int budget) in cpsw_tx_mq_poll() argument
143 if (unlikely(txv->budget > budget - num_tx)) in cpsw_tx_mq_poll()
144 cur_budget = budget - num_tx; in cpsw_tx_mq_poll()
146 cur_budget = txv->budget; in cpsw_tx_mq_poll()
149 if (num_tx >= budget) in cpsw_tx_mq_poll()
153 if (num_tx < budget) { in cpsw_tx_mq_poll()
161 int cpsw_tx_poll(struct napi_struct *napi_tx, int budget) in cpsw_tx_poll() argument
166 num_tx = cpdma_chan_process(cpsw->txv[0].ch, budget); in cpsw_tx_poll()
167 if (num_tx < budget) { in cpsw_tx_poll()
179 int cpsw_rx_mq_poll(struct napi_struct *napi_rx, int budget) in cpsw_rx_mq_poll() argument
193 if (unlikely(rxv->budget > budget - num_rx)) in cpsw_rx_mq_poll()
194 cur_budget = budget - num_rx; in cpsw_rx_mq_poll()
196 cur_budget = rxv->budget; in cpsw_rx_mq_poll()
199 if (num_rx >= budget) in cpsw_rx_mq_poll()
203 if (num_rx < budget) { in cpsw_rx_mq_poll()
211 int cpsw_rx_poll(struct napi_struct *napi_rx, int budget) in cpsw_rx_poll() argument
216 num_rx = cpdma_chan_process(cpsw->rxv[0].ch, budget); in cpsw_rx_poll()
217 if (num_rx < budget) { in cpsw_rx_poll()
351 int budget, bigest_rate_ch = 0; in cpsw_split_res() local
390 budget = NAPI_POLL_WEIGHT; in cpsw_split_res()
394 txv[i].budget = (ch_rate * NAPI_POLL_WEIGHT) / max_rate; in cpsw_split_res()
395 if (!txv[i].budget) in cpsw_split_res()
396 txv[i].budget++; in cpsw_split_res()
407 txv[i].budget = ch_budget; in cpsw_split_res()
413 budget -= txv[i].budget; in cpsw_split_res()
416 if (budget) in cpsw_split_res()
417 txv[bigest_rate_ch].budget += budget; in cpsw_split_res()
420 budget = NAPI_POLL_WEIGHT; in cpsw_split_res()
421 ch_budget = budget / cpsw->rx_ch_num; in cpsw_split_res()
423 cpsw->rxv[i].budget = ch_budget; in cpsw_split_res()
424 budget -= ch_budget; in cpsw_split_res()
427 if (budget) in cpsw_split_res()
428 cpsw->rxv[0].budget += budget; in cpsw_split_res()