Commit 9371a56f authored by Ilias Apalodimas's avatar Ilias Apalodimas Committed by David S. Miller

net: netsec: remove loops in napi Rx process

netsec_process_rx was running in a loop trying to process as many packets
as possible before re-enabling interrupts. With the recent DMA changes
this is not needed anymore as we manage to consume all the budget without
looping over the function.
Since it has no performance penalty let's remove that and simplify the Rx
path a bit
Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 39e3622e
......@@ -820,19 +820,12 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
static int netsec_napi_poll(struct napi_struct *napi, int budget)
{
struct netsec_priv *priv;
int rx, done, todo;
int done;
priv = container_of(napi, struct netsec_priv, napi);
netsec_process_tx(priv);
todo = budget;
do {
rx = netsec_process_rx(priv, todo);
todo -= rx;
} while (rx);
done = budget - todo;
done = netsec_process_rx(priv, budget);
if (done < budget && napi_complete_done(napi, done)) {
unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment