netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next v2 0/6] ipaddress: Get rid of print_linkinfo_brief()
@ 2018-01-30 18:09 Serhey Popovych
  2018-01-30 18:09 ` [PATCH iproute2-next v2 1/6] ipaddress: Improve print_linkinfo() Serhey Popovych
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Serhey Popovych @ 2018-01-30 18:09 UTC (permalink / raw)
  To: netdev

With this series I propose to get rid of custom print_linkinfo_brief()
in favor of print_linkinfo() to avoid code duplication.

Changes presented with this series tested using following script:

iproute2_dir="$1"
iface='eth0.2'

pushd "$iproute2_dir" &>/dev/null

for i in new old; do
	DIR="/tmp/$i"
	mkdir -p "$DIR"

	ln -snf ip.$i ip/ip

	# normal
	ip/ip link show                  >"$DIR/ip-link-show"
	ip/ip -4 addr show               >"$DIR/ip-4-addr-show"
	ip/ip -6 addr show               >"$DIR/ip-6-addr-show"
	ip/ip addr show dev "$iface"     >"$DIR/ip-addr-show-$iface"

	# brief
	ip/ip -br link show              >"$DIR/ip-br-link-show"
	ip/ip -br -4 addr show           >"$DIR/ip-br-4-addr-show"
	ip/ip -br -6 addr show           >"$DIR/ip-br-6-addr-show"
	ip/ip -br addr show dev "$iface" >"$DIR/ip-br-addr-show-$iface"
done
rm -f ip/ip

diff -urN /tmp/{old,new}
rc=$?

popd &>/dev/null
exit $rc

Expected results : <no output>
Actual results   : <no output>

Although test coverage is far from ideal in my opinion it covers most
important aspects of the changes presented by the series.

All this work is done in prepare of iplink_get() enhancements to support
attribute parse that finally will be used to simplify ip/tunnel
RTM_GETLINK code.

As always reviews, comments, suggestions and criticism is welcome.

v2
  Make print_linkinfo_brief() static instead of inlining it's code into
  print_linkinfo(). Better for review, better for code style, compiler
  will optimize this anyway.

Thanks,
Serhii

Serhey Popovych (6):
  ipaddress: Improve print_linkinfo()
  ipaddress: Simplify print_linkinfo_brief() and it's usage
  lib: Correct object file dependencies
  utils: Introduce and use get_ifname_rta()
  utils: Introduce and use print_name_and_link() to print name@link
  ipaddress: Make print_linkinfo_brief() static

 bridge/link.c   |   21 +++----
 include/utils.h |    5 ++
 ip/ip_common.h  |    3 -
 ip/ipaddress.c  |  172 ++++++++++---------------------------------------------
 ip/iplink.c     |    5 +-
 lib/Makefile    |    4 +-
 lib/utils.c     |   70 ++++++++++++++++++++++
 7 files changed, 114 insertions(+), 166 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-02-01 15:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 18:09 [PATCH iproute2-next v2 0/6] ipaddress: Get rid of print_linkinfo_brief() Serhey Popovych
2018-01-30 18:09 ` [PATCH iproute2-next v2 1/6] ipaddress: Improve print_linkinfo() Serhey Popovych
2018-02-01  3:29   ` David Ahern
2018-02-01 10:59     ` Serhey Popovych
2018-01-30 18:09 ` [PATCH iproute2-next v2 2/6] ipaddress: Simplify print_linkinfo_brief() and it's usage Serhey Popovych
2018-02-01  3:43   ` David Ahern
2018-02-01 11:00     ` Serhey Popovych
2018-01-30 18:09 ` [PATCH iproute2-next v2 3/6] lib: Correct object file dependencies Serhey Popovych
2018-01-30 18:09 ` [PATCH iproute2-next v2 4/6] utils: Introduce and use get_ifname_rta() Serhey Popovych
2018-02-01  3:45   ` David Ahern
2018-01-30 18:09 ` [PATCH iproute2-next v2 5/6] utils: Introduce and use print_name_and_link() to print name@link Serhey Popovych
2018-02-01  3:50   ` David Ahern
2018-02-01 11:09     ` Serhey Popovych
2018-02-01 15:40       ` David Ahern
2018-01-30 18:09 ` [PATCH iproute2-next v2 6/6] ipaddress: Make print_linkinfo_brief() static Serhey Popovych
2018-02-01  3:53 ` [PATCH iproute2-next v2 0/6] ipaddress: Get rid of print_linkinfo_brief() David Ahern
2018-02-01 11:12   ` Serhey Popovych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).