Re: [V2 RFC net-next PATCH 2/2] virtio_net: export more statisticsthrough ethtool

From: Ben Hutchings
Date: Thu Jun 07 2012 - 13:15:07 EST


On Wed, 2012-06-06 at 15:52 +0800, Jason Wang wrote:
> Satistics counters is useful for debugging and performance optimization, so this
> patch lets virtio_net driver collect following and export them to userspace
> through "ethtool -S":
>
> - number of packets sent/received
> - number of bytes sent/received
> - number of callbacks for tx/rx
> - number of kick for tx/rx
> - number of bytes/packets queued for tx
>
> As virtnet_stats were per-cpu, so both per-cpu and gloabl satistics were
> collected like:
[...]

I would really like to see some sort of convention for presenting
per-queue statistics through ethtool. At the moment we have a complete
mess of different formats:

bnx2x: "[${index}]: ${name}"
be2net: "${qtype}q${index}: ${name}"
ehea: "PR${index} ${name}"
mlx4_en: "${qtype}${index}_${name}"
myri10ge: dummy stat names as headings
niu: dummy stat names as headings
s2io: "ring_${index}_${name}"
vmxnet3: dummy stat names as headings
vxge: "${name}_${index}"; also dummy stat names as headings

And you're introducing yet another format!

(Additionally some of the drivers are playing games with spaces and tabs
to make ethtool indent the stats the way they like. Ethtool statistics
are inconsistent enough already without drivers pulling that sort of
crap.

I'm inclined to make ethtool start stripping whitespace from stat names,
and *if* people can agree on a common format for per-queue statistic
names then I'll indent them *consistently*. Also, I would make such
stats optional, so you don't get hundreds of lines of crap by default.)

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/