]> git.baikalelectronics.ru Git - kernel.git/commit
net: fs_enet: merge NAPI RX and NAPI TX
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 9 Sep 2016 12:26:21 +0000 (14:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2016 04:17:13 +0000 (21:17 -0700)
commit7c9a390cf301d8297fe66a042811b68c27c6880b
tree2bce5c80ae4452092c2e08a9f054296a3af65f24
parent488eb30e11ef6308ad477c8346f711424ae20a93
net: fs_enet: merge NAPI RX and NAPI TX

Initially, a NAPI TX routine has been implemented separately from
NAPI RX, as done on the freescale/gianfar driver.

By merging NAPI RX and NAPI TX, we reduce the amount of TX completion
interrupts.

Handling of the budget in association with TX interrupts is based on
indications provided at https://wiki.linuxfoundation.org/networking/napi
We never proceed more than the complete TX ring on a single run.

At the same time, we fix an issue in the handling of fep->tx_free:

It is only when fep->tx_free goes up to MAX_SKB_FRAGS that
we need to wake up the queue. There is no need to call
netif_wake_queue() at every packet successfully transmitted.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
drivers/net/ethernet/freescale/fs_enet/fs_enet.h
drivers/net/ethernet/freescale/fs_enet/mac-fcc.c
drivers/net/ethernet/freescale/fs_enet/mac-fec.c
drivers/net/ethernet/freescale/fs_enet/mac-scc.c