Skip to content

sunvnet: Packet processing in non-interrupt context.

Sowmini Varadhan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 33 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sunvnet: Process Rx data packets in a BH handlerdrivers/net/ethernet/sun/sunvnet.c drivers/net/ethernet/sun/sunvnet.h+91 -452 replies
2/2sunvnet: vnet_start_xmit() must hold a refcnt on port.drivers/net/ethernet/sun/sunvnet.c drivers/net/ethernet/sun/sunvnet.h+55 -811 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchRaghuram Kothakota
1/2A-b
2/2A-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 [PATCH net-next 0/2] sunvnet: Packet processing in non-interrupt context.

The existing sunvnet implementation does all the packet interception in LDC interrupt context. Patch 1 of this series moves the data processing to a bottom-half handler.

Some context for the reasons for choosing a BH handler over NAPI:
A NAPI (or simple tasklet) based implementation provides softirq context, which allows the driver to safely invoke netif_receive_skb() to deliver the packet to the IP stack. But in the case of sunvnet, we are already receiving multiple packets for a single ldc_rx interrupt, so the budget-based softirq-vs-polling infra does not provide a significant optimization. Rather, it can get in the way, if we constrain the vnet-rx path to a poorly chosen budget, and force ourselves to send a STOPPED/START ldc exchange needlessly.

A BH Rx handler is a simpler way to avoid the weaknesses of processing packets in LDC interrupt context, and also provides Rx load-spreading across multiple CPUs.

Note that PATCH 1 is dependant on the functions added as part of the sparc-next commit "sparc64: Add vio_set_intr() to enable/disable Rx interrupts" (Cf: http://www.spinics.net/lists/sparclinux/msg12647.html)

PATCH 2 of this series fixes a race-condition between vnet_port_remove() and vnet_start_xmit().

Sowmini Varadhan (2):
Process Rx data packets in a BH handler
vnet_start_xmit() must hold a refcnt on port.

 drivers/net/ethernet/sun/sunvnet.c | 187 +++++++++++++++++++++++++++----------
 drivers/net/ethernet/sun/sunvnet.h |  12 ++-
 2 files changed, 146 insertions(+), 53 deletions(-)
Signature · 1 line
1.8.4.2