[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180220104421.GA21674@bistromath.localdomain>
Date: Tue, 20 Feb 2018 11:44:21 +0100
From: Sabrina Dubroca <sd@...asysnail.net>
To: Serhey Popovych <serhe.popovych@...il.com>
Cc: netdev@...r.kernel.org, David Ahern <dsahern@...il.com>,
sbrivio@...hat.com
Subject: Re: [PATCH iproute2-next] ip link: add support to display extended
tun attributes
2018-02-20, 00:19:25 +0200, Serhey Popovych wrote:
> I get following checkpatch.pl warnings:
>
> WARNING: Missing a blank line after declarations
> #73: FILE: ip/iptuntap.c:497:
> + __u8 mq = rta_getattr_u8(tb[IFLA_TUN_MULTI_QUEUE]);
> + if (!mq)
>
> WARNING: Missing a blank line after declarations
> #80: FILE: ip/iptuntap.c:504:
> + __u32 numq = rta_getattr_u32(tb[IFLA_TUN_NUM_QUEUES]);
> + fprintf(f, "numqueues %u ", numq);
>
> WARNING: Missing a blank line after declarations
> #85: FILE: ip/iptuntap.c:509:
> + __u32 numq =
> rta_getattr_u32(tb[IFLA_TUN_NUM_DISABLED_QUEUES]);
> + fprintf(f, "numdisabled %u ", numq);
>
> maybe they should be fixed before accepting?
IMHO fixing those makes the code slightly uglier, but sure,
I'll send a v2.
> I wonder if we can use tun_print_opt() and it's infrastructure
> in print_tuntap(). Now they use read_prop() to read same information
> from sysfs while netlink provides it.
I wouldn't, for 2 reasons:
- these netlink attributes aren't exposed by older kernels, so if you
run "ip tuntap" on an older kernel, you won't get any information
about tun/tap devices anymore
- the output format is not the same, I don't want to break existing
users of ip tuntap that expect a specific format
--
Sabrina
Powered by blists - more mailing lists