Go to file
Aya Levin af646bf953 devlink: Fix fmsg nesting in non JSON output
When an object or an array opening follows a name (label), add a new
line and indentation before printing the label. When name (label) is
followed by a value, print both at the same line.

Prior to this patch nesting was not visible in a non JSON output:
JSON:
{
    "Common config": {
        "SQ": {
            "stride size": 64,
            "size": 1024
        },
        "CQ": {
            "stride size": 64,
            "size": 1024
        } },
    "SQs": [ {
            "channel ix": 0,
            "sqn": 10,
            "HW state": 1,
            "stopped": false,
            "cc": 0,
            "pc": 0,
            "CQ": {
                "cqn": 6,
                "HW status": 0
            }
         },{
            "channel ix": 0,
            "sqn": 14,
            "HW state": 1,
            "stopped": false,
            "cc": 0,
            "pc": 0,
            "CQ": {
                "cqn": 10,
                "HW status": 0
            }
         } ]
}

Before this patch:
Common Config: SQ: stride size: 64 size: 1024
CQ: stride size: 64 size: 1024
SQs:
  channel ix: 0 tc: 0 txq ix: 0 sqn: 10 HW state: 1 stopped: false cc: 0 pc: 0 CQ: cqn: 6 HW status: 0
  channel ix: 1 tc: 0 txq ix: 1 sqn: 14 HW state: 1 stopped: false cc: 0 pc: 0 CQ: cqn: 10 HW status: 0

With this patch:
Common config:
  SQ:
    stride size: 64 size: 1024
    CQ:
      stride size: 64 size: 1024
SQs:
  channel ix: 0 sqn: 10 HW state: 1 stopped: false cc: 0 pc: 0
  CQ:
    cqn: 6 HW status: 0
  channel ix: 1 sqn: 14 HW state: 1 stopped: false cc: 0 pc: 0
  CQ:
    cqn: 10 HW status: 0

Fixes: 7b8baf834d ("devlink: Add devlink health diagnose command")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-12-16 20:52:37 -08:00
bash-completion tc: pie: add dq_rate_estimator option 2019-12-04 10:49:42 -08:00
bridge bridge: Fix tunnelshow json output 2019-12-16 20:49:28 -08:00
devlink devlink: Fix fmsg nesting in non JSON output 2019-12-16 20:52:37 -08:00
doc/actions doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
etc/iproute2 iproute2: Add support for a few routing protocols 2018-06-11 11:18:30 -07:00
examples/bpf examples: remove diffserv 2019-10-23 09:13:55 -07:00
genl genl: remove dead code 2018-11-19 11:42:44 -08:00
include json_print: Remove declaration without implementation 2019-12-16 20:49:28 -08:00
ip ip: fix oneline output 2019-11-25 21:34:13 +00:00
lib Merge branch 'master' into next 2019-11-09 00:38:37 +00:00
man bridge: Fix src_vni argument in man page 2019-12-16 20:49:28 -08:00
misc ss: fix end-of-line printing in misc/ss.c 2019-12-05 12:19:00 -08:00
netem doc: remove trailing whitespace 2018-12-19 12:02:38 -08:00
rdma rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
schema bridge: add json schema for bridge fdb show 2016-07-20 12:02:02 -07:00
tc tc: fix warning in tc/q_pie.c 2019-12-05 12:18:54 -08:00
testsuite bridge: Fix tunnelshow json output 2019-12-16 20:49:28 -08:00
tipc tipc: add new commands to set TIPC AEAD key 2019-11-25 23:14:11 +00:00
.clang-format clang-format: add configuration file 2019-01-17 13:38:23 -08:00
.gitignore Remove leftovers from removed Latex documentation 2018-02-13 16:43:19 -08:00
.mailmap mailmap: map David's mail address 2019-05-15 09:50:42 -07:00
configure configure: fix typo in check_xt_old_internal_h 2019-01-07 14:42:01 -08:00
COPYING Update address of FSF in license 2008-03-08 13:31:03 -08:00
Makefile don't install examples 2019-10-23 10:21:06 -07:00
README README: update libdb build dependency information 2018-05-01 19:29:03 -07:00
README.devel README: update location of git repositories, remove broken info link 2018-02-13 16:42:51 -08:00

This is a set of utilities for Linux networking.

Information:
    https://wiki.linuxfoundation.org/networking/iproute2

Download:
    http://www.kernel.org/pub/linux/utils/net/iproute2/

Stable version repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Development repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

How to compile this.
--------------------
1. libdbm

arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines.  Often this is in the db-devel package.

2. make

The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.

3. To make documentation, cd to doc/ directory , then
   look at start of Makefile and set correct values for
   PAGESIZE=a4		, ie: a4 , letter ...	(string)
   PAGESPERPAGE=2	, ie: 1 , 2 ...		(numeric)
   and make there. It assumes, that latex, dvips and psnup
   are in your path.

4. This package includes matching sanitized kernel headers because
   the build environment may not have up to date versions. See Makefile
   if you have special requirements and need to point at different
   kernel include files.

Stephen Hemminger
stephen@networkplumber.org

Alexey Kuznetsov
kuznet@ms2.inr.ac.ru