public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail•com>
To: Stephen Hemminger <stephen@networkplumber•org>,
	David Ahern <dsahern@gmail•com>
Cc: netdev <netdev@vger•kernel.org>, "Maciej Żenczykowski" <maze@google•com>
Subject: [BUG iproute2] ip tuntap show
Date: Wed, 31 Jan 2018 08:58:28 -0800	[thread overview]
Message-ID: <1517417908.3715.102.camel@gmail.com> (raw)

ip tuntap enumerates devices using /sys/class/net which is unusual.

Should we replace this enumeration using /proc/net/dev like "ip tunnel" ?

After "unshare -n" maybe mounting /sys should not be required for
proper iproute2 behavior.

At least ip command should adopt a common enumeration method.

What do you think ?

Thanks.

lpaa5:~# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
  adp0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
uinput4:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
dynencap4:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
sixtofour0:  696886    6733    0    0    0     0          0         0   480743    4445    0    0    0     0       0          0
uinput6:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
gretap0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ip6gre0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
 tunl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ip6tnl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  gre0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  sit0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
sixdecap0:       0       0    0    0    0     0          0         0   559849    2371    0    0    0     0       0          0
    lo: 80924524  222675    0    0    0     0          0         0 80924524  222675    0    0    0     0       0          0
  eth2: 8898473491 131730002    0    0    0     0          0        89 8606929352 128406009    0    0    0     0       0          0
dynencap6:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  eth1: 9219322658 137558705    0    0    0     0          0      1592 9438658576 140822798    0    0    0     0       0          0
  eth0: 18117796393 269288710    0    0    0     0          0      1682 18045588486 269228813    0    3    0     0       0          0

lpaa5:~# unshare -n

lpaa5:~# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0

lpaa5:~# ip tuntap
adp0: tap vnet_hdr UNKNOWN_FLAGS:940

lpaa5:~# mount -t sysfs sysfs /sys

lpaa5:~# ip tuntap

lpaa5:~# ls -l /sys/class/net
total 0
-rw-r--r-- 1 root root 4096 Jan 31 08:51 bonding_masters
lrwxrwxrwx 1 root root    0 Jan 31 08:51 lo -> ../../devices/virtual/net/lo
lpaa5:~# 

             reply	other threads:[~2018-01-31 16:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 16:58 Eric Dumazet [this message]
2018-01-31 17:21 ` [BUG iproute2] ip tuntap show Serhey Popovych
2018-01-31 17:40   ` David Ahern
2018-01-31 17:43     ` Serhey Popovych
2018-01-31 19:51     ` Serhey Popovych
2018-02-05 15:34     ` Serhey Popovych
2018-02-05 16:25       ` David Ahern

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=1517417908.3715.102.camel@gmail.com \
    --to=eric.dumazet@gmail$(echo .)com \
    --cc=dsahern@gmail$(echo .)com \
    --cc=maze@google$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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