Skip to contentSkip to conversation

sunvnet: NAPIfy sunvnet

RFC PATCH Superseded Sowmini Varadhan 2 participants 3 messages Oct 15, 2014 – Oct 22, 2014

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover sunvnet: NAPIfy sunvnet

This patchset converts the sunvnet driver to use the NAPI framework.

Patch 1 in the series addresses the packet-receive path- all
the vnet_event() processing is moved into NAPI context.
This patch is dependant on the sparc-next commit:
"sparc64: Add vio_set_intr() to enable/disable Rx interrupts"
(Please cherry-pick sparc commit id ca605b7dd740c8909408d67911d8ddd272c2b320)

Patch 2 uses RCU to fix race conditions between vnet_port_remove and paths that access/modify port-related state, such as vnet_start_xmit.

Patch 3 and Patch 4 in the series leverage from the NAPIfied Rx path, dropping superfluous usage of the irqsave/irqrestores on the vio.lock where possible.

Note: Patch 3 contains changes that target sparc-next, Patch 4 targets net-next.

Sowmini Varadhan (4):
NAPIfy sunvnet
Use RCU to synchronize port usage with vnet_port_remove() Avoid irqsave/restore on vio.lock if in_softirq() Remove irqsave/irqrestore on vio.lock

 arch/sparc/kernel/viohs.c          |   8 +-
 drivers/net/ethernet/sun/sunvnet.c | 261 +++++++++++++++++++++++--------------
 drivers/net/ethernet/sun/sunvnet.h |   6 +-
 3 files changed, 176 insertions(+), 99 deletions(-)
Signature · 1 line
1.8.4.2
#1 lore raw

Please hold off on this patch-set for the moment.

I just discovered a subtle bug that can be triggered when multiple ldc events (e.g., UP and DATA_READY) are passed up from ldc_rx -> send_events in one shot- we need to treat the vnet_port's (new field) rx_event as a bit mask, and need to unroll send_events() into vnet_event_napi.

the result of this bug is that inter-vnet handshake can sometimes fail incorrectly causing things to needlessly go thorugh the switchport. I'm working on the fix for this, I'll send out PATCHv5 for this series shortly.

Apologies for the confusion.

--Sowmini

maintainer
#2 lore raw

From: Sowmini Varadhan <[email protected]>
Date: Wed, 22 Oct 2014 14:57:57 -0400

Quoted 1 line

Please hold off on this patch-set for the moment.

Ok, no problem.