[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e92cca15-21d7-e71b-ae7d-617263c68a45@gmail.com>
Date: Mon, 26 Feb 2018 18:07:24 +0200
From: Serhey Popovych <serhe.popovych@...il.com>
To: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v3 8/8] iplink: Reduce number of arguments
to iplink_parse()
David Ahern wrote:
> 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 <serhe.popovych@...il.com>
>> ---
>> 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.
Real benefit at the moment: reduce number of parameters in function
iplink_parse() that has trend to grow. Someone needs something in
->parse_opt() that is in netlink buffer. How to provide this best?
In my opinion is to add field to struct rather than argument to a function.
>
>
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists