From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f49.google.com ([209.85.215.49]:36223 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbeBTTkQ (ORCPT ); Tue, 20 Feb 2018 14:40:16 -0500 Received: by mail-lf0-f49.google.com with SMTP id t79so5867142lfe.3 for ; Tue, 20 Feb 2018 11:40:15 -0800 (PST) From: Serhey Popovych To: netdev@vger.kernel.org Cc: dsahern@gmail.com Subject: [PATCH iproute2-next 0/8] iplink: Improve iplink_parse() Date: Tue, 20 Feb 2018 21:39:50 +0200 Message-Id: <1519155598-22137-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: This is main routine to parse ip-link(8) configuration parameters. Main reason to improve it is to pass network device @name, @dev and other parameters to kind specific ->parse_opt() function so they can use this information. For example later we will extend iplink_get() to parse netlink attributes deeper and replace open coded rtnl_talk() in ip/tunnel modules to simplify getting existing tunnel information. Among main change there is a number of patches to prepare for it that improve iplink_parse() in some way. See individual patch description message for more information. Thanks, Serhii Serhey Popovych (8): iplink: Return from function instead of calling exit() utils: Introduce and use nodev() helper routine iplink: Correctly report error when network device isn't found iplink: Use "dev" and "name" parameters interchangeable when possible iplink: Follow documented behaviour when "index" is given iplink: Perform most of request buffer setups and checks in iplink_parse() iplink: Move data structures to block of their users iplink: Reduce number of arguments to iplink_parse() bridge/fdb.c | 17 ++-- bridge/link.c | 8 +- bridge/mdb.c | 19 ++--- bridge/vlan.c | 7 +- include/utils.h | 1 + ip/ip6tunnel.c | 6 +- ip/ip_common.h | 17 +++- ip/ipaddress.c | 7 +- ip/iplink.c | 207 +++++++++++++++++++++++++++------------------- ip/iplink_bond.c | 8 +- ip/iplink_bond_slave.c | 4 +- ip/iplink_bridge.c | 11 ++- ip/iplink_bridge_slave.c | 4 +- ip/iplink_can.c | 4 +- ip/iplink_geneve.c | 4 +- ip/iplink_hsr.c | 4 +- ip/iplink_ipoib.c | 4 +- ip/iplink_ipvlan.c | 4 +- ip/iplink_macvlan.c | 4 +- ip/iplink_vlan.c | 4 +- ip/iplink_vrf.c | 5 +- ip/iplink_vxcan.c | 39 +++------ ip/iplink_vxlan.c | 11 ++- ip/iplink_xdp.c | 7 +- ip/ipmacsec.c | 4 +- ip/ipmroute.c | 7 +- ip/ipneigh.c | 15 ++-- ip/ipntable.c | 6 +- ip/iproute.c | 36 +++----- ip/iproute_lwtunnel.c | 4 +- ip/iptunnel.c | 6 +- ip/link_gre.c | 43 +++++----- ip/link_gre6.c | 43 +++++----- ip/link_ip6tnl.c | 40 ++++----- ip/link_iptnl.c | 40 ++++----- ip/link_veth.c | 39 +++------ ip/link_vti.c | 43 +++++----- ip/link_vti6.c | 43 +++++----- lib/utils.c | 6 ++ tc/m_mirred.c | 6 +- tc/tc_class.c | 14 ++-- tc/tc_filter.c | 18 ++-- tc/tc_qdisc.c | 12 +-- 43 files changed, 409 insertions(+), 422 deletions(-) -- 1.7.10.4