Re: [PATCH v4 net-next 3/4] net: ethernet: ti: davinci_cpdma: return handler status

From: Willem de Bruijn
Date: Tue Jun 25 2019 - 22:18:12 EST


On Tue, Jun 25, 2019 at 2:00 PM Ivan Khoronzhuk
<ivan.khoronzhuk@xxxxxxxxxx> wrote:
>
> This change is needed to return flush status of rx handler for
> flushing redirected xdp frames after processing channel packets.
> Do it as separate patch for simplicity.
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@xxxxxxxxxx>

> @@ -602,7 +605,8 @@ static int cpsw_tx_mq_poll(struct napi_struct *napi_tx, int budget)
> else
> cur_budget = txv->budget;
>
> - num_tx += cpdma_chan_process(txv->ch, cur_budget);
> + cpdma_chan_process(txv->ch, &cur_budget);
> + num_tx += cur_budget;

Less code change to add a new argument int *flush to communicate the
new state and leave the existing argument and return values as is?