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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f20e633d-48af-197a-0124-3c20984fa4e0@huawei.com>
Date: Wed, 3 Jan 2024 12:02:01 +0800
From: Chengchang Tang <tangchengchang@...wei.com>
To: Stephen Hemminger <stephen@...workplumber.org>, <leon@...nel.org>
CC: <netdev@...r.kernel.org>
Subject: Re: [RFC iproute2 0/8] rdma: print related patches



On 2024/1/3 8:34, Stephen Hemminger wrote:
> This set of patches makes rdma comman behave more like the
> other commands in iproute2 around printing flags.
> There are some other things found while looking at that code.
>
> Stephen Hemminger (8):
>    rdma: shorten print_ lines
>    rdma: use standard flag for json
>    rdma: make pretty behave like other commands
>    rdma: make supress_errors a bit
>    rdma: add oneline flag
>    rdma: do not mix newline and json object
>    rdma: remove duplicate forward declaration
>    rdma: remove unused rd argument
>
>   man/man8/rdma.8 | 12 +++++++--
>   rdma/dev.c      | 40 ++++++++++++++--------------
>   rdma/link.c     | 52 +++++++++++++++++-------------------
>   rdma/rdma.c     | 21 ++++++++++-----
>   rdma/rdma.h     | 10 +++----
>   rdma/res-cmid.c | 37 ++++++++++++--------------
>   rdma/res-cq.c   | 35 ++++++++++++------------
>   rdma/res-ctx.c  | 11 ++++----
>   rdma/res-mr.c   | 26 +++++++++---------
>   rdma/res-pd.c   | 21 +++++++--------
>   rdma/res-qp.c   | 50 +++++++++++++++++-----------------
>   rdma/res-srq.c  | 27 ++++++++++---------
>   rdma/res.c      | 39 +++++++++++----------------
>   rdma/res.h      | 18 +++++--------
>   rdma/stat-mr.c  | 10 +++----
>   rdma/stat.c     | 68 +++++++++++++++++++++-------------------------
>   rdma/stat.h     |  4 +--
>   rdma/sys.c      | 11 +++-----
>   rdma/utils.c    | 71 +++++++++++++++++++------------------------------
>   19 files changed, 267 insertions(+), 296 deletions(-)
>
Pretty mode works well. But there seems to be something wrong with 
oneline, which
puts all information on the same line. This behavior is different with ip.

```bash
[root@...alhost iproute2]# ./rdma/rdma res show qp
link mlx5_0/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link mlx5_1/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link mlx5_2/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link hns_0/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link hns_1/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link hns_2/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]
link hns_3/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]

[root@...alhost iproute2]# ./rdma/rdma res show qp -o
link mlx5_0/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] \link 
mlx5_1/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] \link 
mlx5_2/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] \link hns_0/1 
lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] \link hns_1/1 lqpn 1 
type GSI state RTS sq-psn 0 comm [ib_core] \link hns_2/1 lqpn 1 type GSI 
state RTS sq-psn 0 comm [ib_core] \link hns_3/1 lqpn 1 type GSI state 
RTS sq-psn 0 comm [ib_core] \[root@...alhost iproute2]#

[root@...alhost iproute2]# ./ip/ip -o a
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever 
preferred_lft forever
1: lo    inet6 ::1/128 scope host \       valid_lft forever 
preferred_lft forever
10: eth8    inet6 fe80::9e52:f8ff:fe8e:f307/64 scope link \ valid_lft 
forever preferred_lft forever
11: eth9    inet6 fe80::268a:7ff:fe55:41d0/64 scope link \ valid_lft 
forever preferred_lft forever
```

Tested-by: Chengchang Tang <tangchengchang@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ