public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: Jakub Kicinski <jakub.kicinski@netronome•com>
Cc: David Ahern <dsahern@gmail•com>,
	netdev@vger•kernel.org,
	Stephen Hemminger <sthemmin@microsoft•com>,
	Jiri Pirko <jiri@mellanox•com>,
	Cong Wang <xiyou.wangcong@gmail•com>,
	Jamal Hadi Salim <jhs@mojatatu•com>
Subject: Re: [PATCH iproute2-next 0/9] TC more JSON support
Date: Fri, 13 Jul 2018 15:22:11 -0700	[thread overview]
Message-ID: <20180713152211.4072bf28@xeon-e3> (raw)
In-Reply-To: <20180713142942.49d24264@cakuba.lan>

On Fri, 13 Jul 2018 14:29:42 -0700
Jakub Kicinski <jakub.kicinski@netronome•com> wrote:

> On Fri, 13 Jul 2018 16:48:28 -0400, David Ahern wrote:
> > On 7/9/18 3:48 PM, Stephen Hemminger wrote:  
> > > From: Stephen Hemminger <sthemmin@microsoft•com>
> > > 
> > > Update core of TC command and library to do more JSON.
> > > Most of this patch set is about getting tc utility functions
> > > to be more friendly to the json_print infrastructure.
> > > 
> > > Stephen Hemminger (9):
> > >   tc: use JSON in error handling
> > >   tc: use const char in util
> > >   tc: convert stats print to json
> > >   tc/cbq: use sprint_rate
> > >   tc/util: remove print_rate
> > >   tc/util: remove unused print_size
> > >   tc/util: remove unused print_time
> > >   tc/util: add print helpers for JSON
> > >   tc/sfq: add json support
> > > 
> > >  tc/q_cbq.c   | 15 ++++-----
> > >  tc/q_sfq.c   | 65 +++++++++++++++++++++---------------
> > >  tc/tc.c      | 19 ++++++-----
> > >  tc/tc_util.c | 94 +++++++++++++++++++++++++++-------------------------
> > >  tc/tc_util.h | 11 +++---
> > >  5 files changed, 109 insertions(+), 95 deletions(-)
> > >     
> > 
> > I'd prefer some tc folks to take a look at the json output and verify
> > everything is good.
> > 
> > Jamal, Jiri, Jakub, Cong, others?
> > 
> > There is a second set with 30 patches as well.  
> 
> AFAIK the 31 patches supersede this set?  I only have tests that use
> JSON for MQ and RED qdiscs, and those work fine with the v2 applied!

This is what I used to test the trivial ones.  Some require more parameters.

#! /bin/sh

for q in cbq cbs choke clsact codel drr dsmark fifo \
	fq fq_codel gred hfsc hhf htb ingress mqprio \
	multiq netem pie prio qfq red rr sfb sfq tbf
do 
    echo -n $q ": "
    sudo tc qdisc add dev dummy0 root $q 2>/dev/null
    if [ $? -ne 0 ]; then
	echo "can not test"
    else
	/sbin/tc qdisc show dev dummy0 >$q.orig
	./tc/tc qdisc show dev dummy0 >$q.new
	if cmp $q.new $q.orig; then
		echo -n "ok"
	else
		echo -n "differ"
	fi
	./tc/tc -j qdisc show dev dummy0 >$q.json
	if python -mjson.tool <$q.json >/dev/null; then
		echo " json ok"
	else
		echo " json format error"
	fi

	sudo tc qdisc del dev dummy0 root
    fi
done

      reply	other threads:[~2018-07-13 22:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 19:48 [PATCH iproute2-next 0/9] TC more JSON support Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 1/9] tc: use JSON in error handling Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 2/9] tc: use const char in util Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 3/9] tc: convert stats print to json Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 4/9] tc/cbq: use sprint_rate Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 5/9] tc/util: remove print_rate Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 6/9] tc/util: remove unused print_size Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 7/9] tc/util: remove unused print_time Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 8/9] tc/util: add print helpers for JSON Stephen Hemminger
2018-07-09 19:48 ` [PATCH iproute2-next 9/9] tc/sfq: add json support Stephen Hemminger
2018-07-13 20:48 ` [PATCH iproute2-next 0/9] TC more JSON support David Ahern
2018-07-13 21:29   ` Jakub Kicinski
2018-07-13 22:22     ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180713152211.4072bf28@xeon-e3 \
    --to=stephen@networkplumber$(echo .)org \
    --cc=dsahern@gmail$(echo .)com \
    --cc=jakub.kicinski@netronome$(echo .)com \
    --cc=jhs@mojatatu$(echo .)com \
    --cc=jiri@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sthemmin@microsoft$(echo .)com \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox