From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f181.google.com ([209.85.192.181]:37428 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbeBZDfZ (ORCPT ); Sun, 25 Feb 2018 22:35:25 -0500 Received: by mail-pf0-f181.google.com with SMTP id s24so5991612pfm.4 for ; Sun, 25 Feb 2018 19:35:25 -0800 (PST) Subject: Re: [PATCH iproute2-next v3 8/8] iplink: Reduce number of arguments to iplink_parse() To: Serhey Popovych , netdev@vger.kernel.org References: <1519304526-18848-1-git-send-email-serhe.popovych@gmail.com> <1519304526-18848-9-git-send-email-serhe.popovych@gmail.com> From: David Ahern Message-ID: <8f84887e-e0a7-fe3a-d2a3-21ab7544133a@gmail.com> Date: Sun, 25 Feb 2018 20:35:22 -0700 MIME-Version: 1.0 In-Reply-To: <1519304526-18848-9-git-send-email-serhe.popovych@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 2/22/18 6:02 AM, Serhey Popovych wrote: > Introduce new @struct iplink_parse_args data structure to consolidate > arguments to iplink_parse(). This will reduce number of arguments > passed to it. > > Pass this data structure to ->parse_opt() in iplink specific modules: > it may be used to get network device name and other information. > > Signed-off-by: Serhey Popovych > --- > ip/ip_common.h | 16 +++++++++++++--- > ip/iplink.c | 34 ++++++++++++++++++++++------------ > ip/iplink_bond.c | 4 +++- > ip/iplink_bond_slave.c | 4 +++- > ip/iplink_bridge.c | 4 +++- > 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 | 14 ++++++-------- > ip/iplink_vxlan.c | 4 +++- > ip/ipmacsec.c | 4 +++- > ip/link_gre.c | 6 ++++-- > ip/link_gre6.c | 6 ++++-- > ip/link_ip6tnl.c | 6 ++++-- > ip/link_iptnl.c | 6 ++++-- > ip/link_veth.c | 14 ++++++-------- > ip/link_vti.c | 6 ++++-- > ip/link_vti6.c | 6 ++++-- > 24 files changed, 114 insertions(+), 57 deletions(-) > Seems like a lot of churn for no benefit.