OSDN Git Service

atl1c: move tx cleanup processing out of interrupt
authorGatis Peisenieks <gatis@mikrotik.com>
Wed, 14 Apr 2021 19:09:20 +0000 (22:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 22:16:54 +0000 (15:16 -0700)
commita1150a04b7e8caee235e38996e042e1bcb1a6574
tree499d81b02975ed5204a1cff5423e5e7f3d90af16
parent2576e5d31f0df37c8d2f037f2d6f9f0a73c45a7a
atl1c: move tx cleanup processing out of interrupt

Tx queue cleanup happens in interrupt handler on same core as rx queue
processing. Both can take considerable amount of processing in high
packet-per-second scenarios.

Sending big amounts of packets can stall the rx processing which is
unfair and also can lead to out-of-memory condition since
__dev_kfree_skb_irq queues the skbs for later kfree in softirq which
is not allowed to happen with heavy load in interrupt handler.

This puts tx cleanup in its own napi and enables threaded napi to
allow the rx/tx queue processing to happen on different cores.

The ability to sustain equal amounts of tx/rx traffic increased:
from 280Kpps to 1130Kpps on Threadripper 3960X with upcoming
Mikrotik 10/25G NIC,
from 520Kpps to 850Kpps on Intel i3-3320 with Mikrotik RB44Ge adapter.

Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atl1c/atl1c.h
drivers/net/ethernet/atheros/atl1c/atl1c_main.c