netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] tun zerocopy stats
@ 2017-10-06 22:25 Willem de Bruijn
  2017-10-06 22:25 ` [PATCH RFC 1/3] tun: ethtool stats Willem de Bruijn
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Willem de Bruijn @ 2017-10-06 22:25 UTC (permalink / raw)
  To: netdev; +Cc: mst, jasowang, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

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(-)

-- 
2.14.2.920.gcf0c67979c-goog

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-10-12 11:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 22:25 [PATCH RFC 0/3] tun zerocopy stats Willem de Bruijn
2017-10-06 22:25 ` [PATCH RFC 1/3] tun: ethtool stats Willem de Bruijn
2017-10-06 22:30   ` Stephen Hemminger
2017-10-06 22:37     ` Willem de Bruijn
2017-10-06 23:12       ` Stephen Hemminger
2017-10-06 23:26         ` David Miller
2017-10-06 22:25 ` [PATCH RFC 2/3] tun: expand ethtool stats with zerocopy Willem de Bruijn
2017-10-06 22:32   ` Willem de Bruijn
2017-10-06 22:25 ` [PATCH RFC 3/3] vhost_net: support tun zerocopy stats Willem de Bruijn
2017-10-10  3:52 ` [PATCH RFC 0/3] " David Miller
2017-10-10 15:29   ` Willem de Bruijn
2017-10-10 17:23     ` Stephen Hemminger
2017-10-10 17:39     ` David Miller
2017-10-10 19:11       ` Willem de Bruijn
2017-10-11  3:15         ` Jason Wang
2017-10-11 21:44           ` Willem de Bruijn
2017-10-12 11:21             ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).