Skip to content

RFC remove netpoll rx support

Eric W. Biederman netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netpoll: Remove dead netpoll_rx codedrivers/net/Kconfig include/linux/netdevice.h include/linux/netpoll.h +2 more+1 -56274 replies
1/2bnx2: Don't receive packets when the napi budget == 0drivers/net/ethernet/broadcom/bnx2.c+3 -01 reply
2/2netpoll: Don't poll for received packetsnet/core/netpoll.c+9 -193 replies
2/28139cp: Don't receive packets when the napi budget == 0drivers/net/ethernet/realtek/8139cp.c+1 -41 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric Dumazet
SeriesA-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
1/2A-b A-b A-b A-b A-b
1/2A-b A-b A-b A-b A-b
2/2A-b A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/2] remove netpoll rx support
Quoted 8 lines · Eric Dumazet
Quoted 6 lines · David Miller

These changes eminate from a recent discussion about netpoll, which can call into the driver from hardware interrupts, particularly when netconsole services a printk from hardware interrupt context.

bnx2x already makes similar ammends.

Quoted 7 lines
Quoted 3 lines

I hope that Eric B. here audited to make sure he's only doing this transformation in situations that actually need this treatment for the above mentioned issue.

I totally understand the TX path, not the RX.

It seems netpoll should not drain rx queues.

It does seem desirable that netpoll should not drain the rx queues. Unfortunately that is not how netpoll is built. By my quick count there are 132 drivers in the kernel that support netpoll.

Several of them such as the e1000e driver already call dev_kfree_skb_any or dev_kfree_skb_irq in their rx paths. What I am implementing seems to be the pattern that the better drivers follow today.

Furthermore netpoll by it's design depends on the ability to receive packets in netpoll_poll_dev. It is a capability I don't think we have ever used in the mainline kernel but it is a capability that is there deliberately. Which means if we want netpoll to not mess with the rx path we need to change netpoll.

If we are willing to change the definition of netpoll this is fixable.

The big enabler is the fact that calling the napi poll function with a budget of 0 means don't perform any rx work.

Which leads to the following set of changes to netpoll if we are brave.

Eric W. Biederman (2):
netpoll: Remove dead netpoll_rx code
netpoll: Don't poll for received packets

 drivers/net/Kconfig       |    5 -
 include/linux/netdevice.h |   17 --
 include/linux/netpoll.h   |   59 ------
 net/core/dev.c            |   11 +-
 net/core/netpoll.c        |  499 +--------------------------------------------
 5 files changed, 10 insertions(+), 581 deletions(-)

Eric