From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 458FD98 for ; Tue, 28 Aug 2018 17:26:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2018 08:26:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,299,1531810800"; d="scan'208";a="69765799" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.221.37]) ([10.237.221.37]) by orsmga006.jf.intel.com with ESMTP; 28 Aug 2018 08:26:39 -0700 To: Stephen Hemminger , Ciara Power Cc: harry.van.haaren@intel.com, brian.archbold@intel.com, emma.kenny@intel.com, dev@dpdk.org References: <1535026093-101872-1-git-send-email-ciara.power@intel.com> <1535026093-101872-4-git-send-email-ciara.power@intel.com> <20180823162733.78507eeb@xeon-e3> From: "Hunt, David" Message-ID: <852b3707-1351-1887-d243-4264b117a3be@intel.com> Date: Tue, 28 Aug 2018 16:26:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180823162733.78507eeb@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 03/11] telemetry: add client feature and sockets 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: , X-List-Received-Date: Tue, 28 Aug 2018 15:26:42 -0000 On 24/8/2018 12:27 AM, Stephen Hemminger wrote: > On Thu, 23 Aug 2018 13:08:05 +0100 > Ciara Power wrote: > >> This patch introduces clients to the telemetry API. >> >> When a client makes a connection through the initial telemetry >> socket, they can send a message through the socket to be >> parsed. Register messages are expected through this socket, to >> enable clients to register and have a client socket setup for >> future communications. >> >> A TAILQ is used to store all clients information. Using this, the >> client sockets are polled for messages, which will later be parsed >> and dealt with accordingly. >> >> Functionality that make use of the client sockets were introduced >> in this patch also, such as writing to client sockets, and sending >> error responses. >> >> Signed-off-by: Ciara Power >> Signed-off-by: Brian Archbold > Rather than using the rather heavyweight jansson library and creating > an additional dependency on an external library; may I recommend reusing > the json_writer library (I wrote) that is part of iproute2 and much > simpler. > > https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/lib/json_writer.c Hi Stephen, Ciara, I'm about to push another patchset to the mailing list in the next few days which also makes use of Jansson. I'm parsing an incoming JSON string containing power management info. The Jansson package comes pre-installed in many operating systems, although you do indeed need to install libjansson-dev to build against it. I would certainly like to see the community accept its use. Regards, Dave.