From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD9D4A0597; Thu, 9 Apr 2020 10:21:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 842A41C1B6; Thu, 9 Apr 2020 10:21:03 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E0B0C1C1AD for ; Thu, 9 Apr 2020 10:21:01 +0200 (CEST) IronPort-SDR: uAVlHXHLmH2rXqErrHAtZYeaX4hRAZeSqlQ18hx5Vc1zq1uLZQCIubJRQgOPmjjkHuCTK4ZtrR fZ/CCZnPPQSA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 01:21:00 -0700 IronPort-SDR: L8XxnsmqpI+Iq5Hr+npIWf30vFq05B0VVOnGqVxAyxih8S2TJJSLG46soSjsVsLkthB43hmxuH CNqkmMODuKXQ== X-IronPort-AV: E=Sophos;i="5.72,362,1580803200"; d="scan'208";a="240554924" Received: from ndavidso-mobl4.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.214.222.217]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 09 Apr 2020 01:20:57 -0700 Date: Thu, 9 Apr 2020 09:20:52 +0100 From: Bruce Richardson To: "Wiles, Keith" Cc: "Power, Ciara" , dev , "Laatz, Kevin" , "Pattan, Reshma" , "jerinjacobk@gmail.com" , "david.marchand@redhat.com" , "mb@smartsharesystems.com" , "thomas@monjalon.net" Message-ID: <20200409082052.GB605@bricha3-MOBL.ger.corp.intel.com> References: <20200319171907.60891-1-ciara.power@intel.com> <20200408164956.47864-1-ciara.power@intel.com> <20200408164956.47864-9-ciara.power@intel.com> <759402D2-5628-4E34-BF87-30068783661F@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <759402D2-5628-4E34-BF87-30068783661F@intel.com> Subject: Re: [dpdk-dev] [PATCH v2 08/16] ethdev: add callback support for telemetry X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 08, 2020 at 07:16:10PM +0100, Wiles, Keith wrote: > > > > On Apr 8, 2020, at 11:49 AM, Power, Ciara wrote: > > > > From: Bruce Richardson > > > > 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 > > Signed-off-by: Ciara Power > > > > --- > > 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(+) > > > + > > +if (link.link_status) > > +ret = snprintf(buffer, buf_len, > > +"{\"status\":\"%s\", \"speed\":%u, \"duplex\":" > > +"\"%s\"}", link.link_status ? "UP" : "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.