> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Bruce Richardson > Sent: Thursday, April 9, 2020 10:21 AM > > On Wed, Apr 08, 2020 at 07:16:10PM +0100, Wiles, Keith wrote: > > > > > > > On Apr 8, 2020, at 11:49 AM, Power, Ciara <ciara.po...@intel.com> > wrote: > > > > > > From: Bruce Richardson <bruce.richard...@intel.com> > > > > > > The ethdev library now registers commands with telemetry, and > > > implements the callback functions. These commands allow the list of > > > ethdev ports and the stats and link status for a port to be > queried. > > > > > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > > > Signed-off-by: Ciara Power <ciara.po...@intel.com> > > > > > > --- > > > v2: > > > - Renamed stats to xstats for device specific stats. > > > - Added link status command for ethdev ports. > > > --- > > > lib/librte_ethdev/Makefile | 4 ++ > > > lib/librte_ethdev/meson.build | 4 ++ > > > lib/librte_ethdev/rte_ethdev.c | 106 > +++++++++++++++++++++++++++++++++ > > > 3 files changed, 114 insertions(+) > > > > <snip> > > + > > > +if (link.link_status) > > > +ret = snprintf(buffer, buf_len, > > > +"{\"status\":\"%s\", \"speed\":%u, \"duplex\":" > > > +"\"%s\"}", link.link_status ? "UP" : "DOWN:",
Also remove the colon after DOWN. > > > +link.link_speed, > > > +(link.link_duplex == ETH_LINK_FULL_DUPLEX) ? > > > +("full-duplex") : ("half-duplex")); > > > > Adding link status nice. Please remove the spaces in the output > string. > > > Good catch, thanks.