Skip to content

RFC tun zerocopy stats

Willem de Bruijn netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tun: ethtool statsdrivers/net/tun.c+38 -04 replies
2/3tun: expand ethtool stats with zerocopydrivers/net/tun.c+69 -101 reply
3/3vhost_net: support tun zerocopy statsdrivers/vhost/net.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] tun zerocopy stats

From: Willem de Bruijn <[email protected]>

Add zerocopy transfer statistics to the vhost_net/tun zerocopy path.

I've been using this to verify recent changes to zerocopy tuning [1]. Sharing more widely, as it may be useful in similar future work.

Use ethtool stats as interface, as these are defined per device driver and can easily be extended.

Make the zerocopy release callback take an extra hop through the tun driver to allow the driver to increment its counters.

Care must be taken to avoid adding an alloc/free to this hot path. Since the caller already must allocate a ubuf_info, make it allocate two at a time and grant one to the tun device.

1/3: introduce ethtool stats (ethtool -S $DEV) for tun devices 2/3: add zerocopy tx and tx_err counters
3/3: convert vhost_net to pass a pair of ubuf_info to tun

[1] http://patchwork.ozlabs.org/patch/822613/

Willem de Bruijn (3):
tun: ethtool stats
tun: expand ethtool stats with zerocopy
vhost_net: support tun zerocopy stats

 drivers/net/tun.c   | 111 ++++++++++++++++++++++++++++++++++++++++++++++++----
 drivers/vhost/net.c |   7 ++--
 2 files changed, 108 insertions(+), 10 deletions(-)
Signature · 1 line
2.14.2.920.gcf0c67979c-goog