[dpdk-dev] [PATCH 03/11] telemetry: add client feature and sockets

Van Haaren, Harry harry.van.haaren at intel.com
Tue Aug 28 19:09:37 CEST 2018


> -----Original Message-----
> From: Hunt, David
> Sent: Tuesday, August 28, 2018 4:27 PM
> To: Stephen Hemminger <stephen at networkplumber.org>; Power, Ciara
> <ciara.power at intel.com>
> Cc: Van Haaren, Harry <harry.van.haaren at intel.com>; Archbold, Brian
> <brian.archbold at intel.com>; Kenny, Emma <emma.kenny at intel.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 03/11] telemetry: add client feature and
> sockets
> 
> 
> On 24/8/2018 12:27 AM, Stephen Hemminger wrote:
> > On Thu, 23 Aug 2018 13:08:05 +0100
> > Ciara Power <ciara.power at intel.com> 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 <ciara.power at intel.com>
> >> Signed-off-by: Brian Archbold <brian.archbold at intel.com>
> > 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_w
> riter.c

Although I tend to prefer lightweight or dependency-free software, in this
case I think the requirements (parsing and writing JSON) is more than we
should implement our own version of in DPDK.

Jansson provides all we need, and as Dave notes below it is a common
library with good packaging support already.

With the Meson build system, I'd like to see it being picked up dynamically
and compiling in automatically when available.

For the existing Make system, I'm OK with Telemetry being off by default
and users switching it on if they wish to accept Jansson dep and gain the
telemetry functionality.


> 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.




More information about the dev mailing list