From: "Carlos R. Mafra" <crmafra@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>,
"John W. Linville" <linville@tuxdriver.com>,
netdev@vger.kernel.org
Subject: /proc/net/dev regression
Date: Sat, 10 Jan 2015 23:25:18 +0000 [thread overview]
Message-ID: <20150110232518.GA3212@linux-g29b.site> (raw)
I use a dockapp called 'wmnet' [1] to monitor the speed of
my internet connection and after the kernel v3.18 it does no
longer work properly (it still doesn't work in v3.19-rc3)
I bisected the problem and the culprit is this commit:
commit 6e094bd805a9b6ad2f5421125db8f604a166616c
Author: Rafał Miłecki <zajec5@gmail.com>
Date: Fri Sep 5 00:18:48 2014 +0200
bcma: move code for core registration into separate function
This cleans code a bit and will us to register cores in other places as
well. The only difference with this patch is using "core_index" for
setting device name.
The problem is caused by the different name that my wireless connection
receives after this patch:
wlp3s0b1 (after the patch)
wlp3s0 (before the patch)
because it affects the display of information in the file /proc/net/dev.
Before the patch the fields are all aligned:
[mafra@linux-g29b:wmnet]$ cat net_dev_good.txt
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 35916 332 0 0 0 0 0 0 35916 332 0 0 0 0 0 0
wlp3s0: 6406428 5794 0 0 0 0 0 0 426813 3778 0 0 0 0 0 0
but after the patch the fields are misaligned:
[mafra@linux-g29b:wmnet]$ cat net_dev_bad.txt
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 600 8 0 0 0 0 0 0 600 8 0 0 0 0 0 0
wlp3s0b1: 9266848 7298 0 0 0 0 0 0 372229 4030 0 0 0 0 0 0
And for some reason this change confuses 'wmnet'. Reading the source code
of 'wmnet' I found that it reads the packets as follows,
totalpackets_in = strtoul(&buffer[15], NULL, 10);
I am not sure if 'wmnet' could do this better (any suggestions?),
but the fact is that it was working before and now it is not.
Any help is greatly appreciated.
[1] wmnet can be found in http://repo.or.cz/w/dockapps.git
next reply other threads:[~2015-01-10 23:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-10 23:25 Carlos R. Mafra [this message]
2015-01-11 0:27 ` /proc/net/dev regression Al Viro
2015-01-11 0:58 ` Carlos R. Mafra
2015-01-11 1:00 ` Al Viro
2015-01-11 1:33 ` Carlos R. Mafra
2015-01-11 1:39 ` Al Viro
2015-01-11 13:40 ` Carlos R. Mafra
2015-01-12 11:47 ` David Laight
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=20150110232518.GA3212@linux-g29b.site \
--to=crmafra@gmail.com \
--cc=hauke@hauke-m.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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).