From: Sabrina Dubroca <sd@queasysnail.net>
To: Serhey Popovych <serhe.popovych@gmail.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@gmail.com>,
sbrivio@redhat.com
Subject: Re: [PATCH iproute2-next] ip link: add support to display extended tun attributes
Date: Tue, 20 Feb 2018 11:44:21 +0100 [thread overview]
Message-ID: <20180220104421.GA21674@bistromath.localdomain> (raw)
In-Reply-To: <73c75acb-4607-d405-8a0d-71b2904e1f64@gmail.com>
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
prev parent reply other threads:[~2018-02-20 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 10:03 [PATCH iproute2-next] ip link: add support to display extended tun attributes Sabrina Dubroca
2018-02-19 22:19 ` Serhey Popovych
2018-02-20 4:09 ` David Ahern
2018-02-20 10:44 ` Sabrina Dubroca [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220104421.GA21674@bistromath.localdomain \
--to=sd@queasysnail.net \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
--cc=serhe.popovych@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).