diff options
author | Eric Dumazet <edumazet@google.com> | 2018-09-21 15:27:38 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-23 21:55:24 -0700 |
commit | ac3d9dd034e565df2c034ab2ca71f0a9f69153c1 (patch) | |
tree | 8cc679798aebb820bdbb0df3c817a6e114ddce8f /sound/hda | |
parent | 16fdf8ba98391650ce4bc4f3f71629d8a413bc21 (diff) |
netpoll: make ndo_poll_controller() optional
As diagnosed by Song Liu, ndo_poll_controller() can
be very dangerous on loaded hosts, since the cpu
calling ndo_poll_controller() might steal all NAPI
contexts (for all RX/TX queues of the NIC). This capture
can last for unlimited amount of time, since one
cpu is generally not able to drain all the queues under load.
It seems that all networking drivers that do use NAPI
for their TX completions, should not provide a ndo_poll_controller().
NAPI drivers have netpoll support already handled
in core networking stack, since netpoll_poll_dev()
uses poll_napi(dev) to iterate through registered
NAPI contexts for a device.
This patch allows netpoll_poll_dev() to process NAPI
contexts even for drivers not providing ndo_poll_controller(),
allowing for following patches in NAPI drivers.
Also we export netpoll_poll_dev() so that it can be called
by bonding/team drivers in following patches.
Reported-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Song Liu <songliubraving@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/hda')
0 files changed, 0 insertions, 0 deletions