[dpdk-dev] [PATCH] ethdev: expose link status and speed using xstats

Van Haaren, Harry harry.van.haaren at intel.com
Wed Jan 20 15:45:05 CET 2016


Hi Kyle,

> From: Kyle Larose [mailto:eomereadig at gmail.com]
> On Wed, Jan 20, 2016 at 9:28 AM, Harry van Haaren
> <harry.van.haaren at intel.com> wrote:
> > This patch exposes link duplex, speed, and status via the
> > existing xstats API.
> 
> I'm slightly confused by this. Why are we exposing operational
> properties of the chip through an API which I thought was primarily
> targeting statistics?


In a fault-detection situation, link state is a good item to monitor - just like
the rest of the statistics on the NIC.


> When I think of statistics and a NIC, I think of
> values which are monotonically increasing. I think of values that are
> derived primary from the packets flowing through the system. I do not
> think of link state, link speed and duplex, which have nothing to do
> with packets, and are not monotonic.


Link state, and speed seem a good fit to me. I'll admit I'm not sure about duplex, and would be happy to respin the patch without duplex if the community would prefer that.


> Should we not have a separate API to get this type information? I
> mean, just because we have a generic "string to uint64_t" map doesn't
> mean we should toss in anything that can fit into a uin64_t.


In theory we could create a new API for this, but I think the current xstats API is a good fit for exposing this info, so why create extra APIs? As a client of the DPDK API, I would prefer more statistics in a single API than have to research and implement two or more APIs to retrieve the information to monitor.

I'm working on exposing keep-alive statistics using an xstats style API, I'll the patches later today so we can discuss them too.


Regards, -Harry


More information about the dev mailing list