lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Aug 2020 16:12:46 +0200
From:   Andrew Lunn <>
To:     Ido Schimmel <>
Cc:,,,,,,,,,,,,,,,, Ido Schimmel <>
Subject: Re: [RFC PATCH net-next 1/6] devlink: Add device metric

On Mon, Aug 17, 2020 at 03:50:54PM +0300, Ido Schimmel wrote:
> From: Ido Schimmel <>
> Add an infrastructure that allows device drivers to dynamically register
> and unregister their supported metrics with devlink. The metrics and
> their values are exposed to user space which can decide to group certain
> metrics together. This allows user space to request a filtered dump of
> only the metrics member in the provided group.
> Currently, the only supported metric type is a counter, but histograms
> will be added in the future for devices that implement histogram agents
> in hardware.

Hi Ido, Amit

Some initial thoughts.

I said this during netdevconf, i think we need some way to group
metrics together. The example you gave was supporting the counters for
a TCAM and VXLAN offload. I expect users are wanting to get just the
TCAM counters, or just the VXLAN counters.

Maybe one way to support this is to allow the create function to pass
the group, rather than defaulting it to 0? The drive can then split
them up, if it wants to. Otherwise, provide some other sort of
identifier which can be used, maybe a hardware block name?

One big difference between this API and normal netlink statistics is
that each devlink counter is totally independent of every other
devlink counter. You cannot compare counters, because they are not
atomically read. Most hardware i come across supports snapshots of the
counters. So with the current ethtool counters, you snapshot them,
read them all into one buffer, and then return them to user space. The
rtnl lock prevents two snapshots at the same time.


Powered by blists - more mailing lists