From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 03/11] telemetry: add client feature and sockets Date: Thu, 23 Aug 2018 16:27:33 -0700 Message-ID: <20180823162733.78507eeb@xeon-e3> References: <1535026093-101872-1-git-send-email-ciara.power@intel.com> <1535026093-101872-4-git-send-email-ciara.power@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: harry.van.haaren@intel.com, brian.archbold@intel.com, emma.kenny@intel.com, dev@dpdk.org To: Ciara Power Return-path: Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 344FC98 for ; Fri, 24 Aug 2018 01:27:41 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id t14-v6so3405214pgf.0 for ; Thu, 23 Aug 2018 16:27:41 -0700 (PDT) In-Reply-To: <1535026093-101872-4-git-send-email-ciara.power@intel.com> 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 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