lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 13 Jul 2018 15:22:11 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [PATCH iproute2-next 0/9] TC more JSON support

On Fri, 13 Jul 2018 14:29:42 -0700
Jakub Kicinski <jakub.kicinski@...ronome.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@...rosoft.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ