aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/socionext
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2019-06-19 13:04:01 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-19 10:28:20 -0400
commit9371a56f7101cc3f12b57db4bfbb6159205211f4 (patch)
treee89dded2aed2eb2ec03949dcb0aa38d4183f38b3 /drivers/net/ethernet/socionext
parentnet: netsec: initialize tx ring on ndo_open (diff)
downloadlinux-dev-9371a56f7101cc3f12b57db4bfbb6159205211f4.tar.xz
linux-dev-9371a56f7101cc3f12b57db4bfbb6159205211f4.zip
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: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/socionext')
-rw-r--r--drivers/net/ethernet/socionext/netsec.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index a10ef700f16d..48fd7448b513 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -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;