linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
@ 2003-04-29 12:34 Christian Bornträger
  2003-04-29 16:28 ` Randy.Dunlap
  2003-05-01 21:12 ` Randy.Dunlap
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Bornträger @ 2003-04-29 12:34 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel

Summary: /proc/net/devices doesnt show all devices using cat. With dd all are 
available.

I tested a kernels prior to 
http://linus.bkbits.net:8080/linux-2.5/cset@1.797.156.3
and it doesnt seem to have this problem.

If I do a 
& 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:     784      10    0    0    0     0          0         0      784      
dummy0:       0       0    0    0    0     0          0         0        0       
 tunl0:       0       0    0    0    0     0          0         0        0       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0: 1078024   19131    0    0    0     0          0         0  5696472   
  eth1:536253967 10078459    0    0    0     0          0         0 3372254868 

I get net devices till eth1, but eth2 and hsi0 are available nevertheless.
but if I do a 

& dd if=/proc/net/dev bs=4096
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    
packets errs drop fifo colls carrier compressed
    lo:    1036      13    0    0    0     0          0         0     1036      
dummy0:       0       0    0    0    0     0          0         0        0       
 tunl0:       0       0    0    0    0     0          0         0        0       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0: 1182386   18424    0    0    0     0          0         0 11838659   
  eth1:30499791987 20594094    0    0    0     0          0         0 
  eth2:184353121774 125264473    0    0    0     0          0         0 
  hsi0:123569282529 3827611    0    0    0     0          0         0 
0+1 records in
0+1 records out

All net devices are shown.

cheers

Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-29 12:34 [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices Christian Bornträger
@ 2003-04-29 16:28 ` Randy.Dunlap
  2003-04-29 20:07   ` Randy.Dunlap
  2003-05-01 21:12 ` Randy.Dunlap
  1 sibling, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2003-04-29 16:28 UTC (permalink / raw)
  To: Christian Bornträger; +Cc: acme, linux-kernel

On Tue, 29 Apr 2003 14:34:18 +0200 Christian Bornträger <linux@borntraeger.net> wrote:

| Summary: /proc/net/devices doesnt show all devices using cat. With dd all are 
| available.
| 
| I tested a kernels prior to 
| http://linus.bkbits.net:8080/linux-2.5/cset@1.797.156.3
| and it doesnt seem to have this problem.


I haven't tried to make that many net devices.
Acme, does this look helpful?
Christian, can you test this patch?

--
~Randy


patch_name:	proc_net_dev_seq.patch
patch_version:	2003-04-29.09:10:38
author:		Randy.Dunlap <rddunlap@osdl.org>
description:	fix /proc/net/dev to include entire file for output
product:	Linux
product_versions: linux-2568-428
changelog:	seq_start() needs to increment i;
URL:		_
requires:	_
conflicts:	_
maintainer:	davem@redhat.com
diffstat:	=
 net/core/dev.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Naur ./net/core/dev.c%SEQ ./net/core/dev.c
--- ./net/core/dev.c%SEQ	2003-04-28 15:07:01.000000000 -0700
+++ ./net/core/dev.c	2003-04-29 09:06:18.000000000 -0700
@@ -1789,7 +1789,7 @@
 	struct net_device *dev;
 	loff_t i;
 
-	for (i = 0, dev = dev_base; dev && i < pos; dev = dev->next);
+	for (i = 0, dev = dev_base; dev && i < pos; dev = dev->next, i++);
 
 	return i == pos ? dev : NULL;
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-29 16:28 ` Randy.Dunlap
@ 2003-04-29 20:07   ` Randy.Dunlap
  2003-04-30  7:11     ` Christian Bornträger
  2003-04-30  8:12     ` Christian Bornträger
  0 siblings, 2 replies; 7+ messages in thread
From: Randy.Dunlap @ 2003-04-29 20:07 UTC (permalink / raw)
  To: linux; +Cc: acme, linux-kernel

On Tue, 29 Apr 2003 09:28:57 -0700 "Randy.Dunlap" <rddunlap@osdl.org> wrote:

| On Tue, 29 Apr 2003 14:34:18 +0200 Christian Bornträger <linux@borntraeger.net> wrote:
| 
| | Summary: /proc/net/devices doesnt show all devices using cat. With dd all are 
| | available.
| | 
| | I tested a kernels prior to 
| | http://linus.bkbits.net:8080/linux-2.5/cset@1.797.156.3
| | and it doesnt seem to have this problem.
| 
| 
| I haven't tried to make that many net devices.
| Acme, does this look helpful?
| Christian, can you test this patch?
| 
| --
| 
| 
| diff -Naur ./net/core/dev.c%SEQ ./net/core/dev.c
| --- ./net/core/dev.c%SEQ	2003-04-28 15:07:01.000000000 -0700
| +++ ./net/core/dev.c	2003-04-29 09:06:18.000000000 -0700
| @@ -1789,7 +1789,7 @@
|  	struct net_device *dev;
|  	loff_t i;
|  
| -	for (i = 0, dev = dev_base; dev && i < pos; dev = dev->next);
| +	for (i = 0, dev = dev_base; dev && i < pos; dev = dev->next, i++);
|  
|  	return i == pos ? dev : NULL;
|  }
| -


Oh well, I don't think that works.

How do I configure the dummy network driver to get loads of interfaces?

--
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-29 20:07   ` Randy.Dunlap
@ 2003-04-30  7:11     ` Christian Bornträger
  2003-04-30 15:49       ` Randy.Dunlap
  2003-04-30  8:12     ` Christian Bornträger
  1 sibling, 1 reply; 7+ messages in thread
From: Christian Bornträger @ 2003-04-30  7:11 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: acme, linux-kernel

> | Christian, can you test this patch?

I can....

> Oh well, I don't think that works.

should I nevertheless test this patch?

> How do I configure the dummy network driver to get loads of interfaces?

Just copy the dummy.o to dummy1.o dummy2.o dummy3.o,  insmod and ifconfig 
them.

cheers Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-29 20:07   ` Randy.Dunlap
  2003-04-30  7:11     ` Christian Bornträger
@ 2003-04-30  8:12     ` Christian Bornträger
  1 sibling, 0 replies; 7+ messages in thread
From: Christian Bornträger @ 2003-04-30  8:12 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: acme, linux-kernel

On Tuesday 29 April 2003 22:07, Randy.Dunlap wrote:
> Oh well, I don't think that works.

Well, it fails differently. Now i get all devices but several times.

[root@tel22fe root]# 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:     784      10    0    0    0     0          0         0      784      
dummy0:       0       0    0    0    0     0          0         0        0       
 tunl0:       0       0    0    0    0     0          0         0        0       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0:   13356     148    0    0    0     0          0         0    27388     
  eth1:     805       3    0    0    0     0          0         0      264       
dummy0:       0       0    0    0    0     0          0         0        0       
 tunl0:       0       0    0    0    0     0          0         0        0       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0:   13356     148    0    0    0     0          0         0    27388     
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
 tunl0:       0       0    0    0    0     0          0         0        0       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0:   13356     148    0    0    0     0          0         0    27388     
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  gre0:       0       0    0    0    0     0          0         0        0       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0:   13356     148    0    0    0     0          0         0    28544     
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  sit0:       0       0    0    0    0     0          0         0        0       
  eth0:   13356     148    0    0    0     0          0         0    28544     
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  eth0:   13356     148    0    0    0     0          0         0    29700     
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  eth1:     805       3    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  eth2:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       
  hsi0:       0       0    0    0    0     0          0         0      264       


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-30  7:11     ` Christian Bornträger
@ 2003-04-30 15:49       ` Randy.Dunlap
  0 siblings, 0 replies; 7+ messages in thread
From: Randy.Dunlap @ 2003-04-30 15:49 UTC (permalink / raw)
  To: Christian Bornträger; +Cc: acme, linux-kernel

On Wed, 30 Apr 2003 09:11:11 +0200 Christian Bornträger <linux@borntraeger.net> wrote:

| > | Christian, can you test this patch?
| 
| I can....
| 
| > Oh well, I don't think that works.
| 
| should I nevertheless test this patch?

You didn't need to.  I had already seen the same results that you saw.

| > How do I configure the dummy network driver to get loads of interfaces?
| 
| Just copy the dummy.o to dummy1.o dummy2.o dummy3.o,  insmod and ifconfig 
| them.

Doesn't work for me.  insmod (from ver. 0.9.11a module-init-tools)
won't load multiple copies of dummy[n].o or dummy[n].ko.
(with dummy already loaded)

For the .o files, it says:
  dummy: no version magic, tainting kernel.
  Error inserting 'dummy1.o': -1 File exists

and for the .ko files, it says:
  Error inserting 'dummy1.ko': -1 File exists

--
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices
  2003-04-29 12:34 [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices Christian Bornträger
  2003-04-29 16:28 ` Randy.Dunlap
@ 2003-05-01 21:12 ` Randy.Dunlap
  1 sibling, 0 replies; 7+ messages in thread
From: Randy.Dunlap @ 2003-05-01 21:12 UTC (permalink / raw)
  To: Christian Bornträger; +Cc: acme, linux-kernel

Hi-

On Tue, 29 Apr 2003 14:34:18 +0200 Christian Bornträger <linux@borntraeger.net> wrote:

| Summary: /proc/net/devices doesnt show all devices using cat. With dd all are 
| available.
| 
| I tested a kernels prior to 
| http://linus.bkbits.net:8080/linux-2.5/cset@1.797.156.3
| and it doesnt seem to have this problem.
| 
| If I do a 
| & 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:     784      10    0    0    0     0          0         0      784      
| dummy0:       0       0    0    0    0     0          0         0        0       
|  tunl0:       0       0    0    0    0     0          0         0        0       
|   gre0:       0       0    0    0    0     0          0         0        0       
|   sit0:       0       0    0    0    0     0          0         0        0       
|   eth0: 1078024   19131    0    0    0     0          0         0  5696472   
|   eth1:536253967 10078459    0    0    0     0          0         0 3372254868 
| 
| I get net devices till eth1, but eth2 and hsi0 are available nevertheless.
| but if I do a 
| 
| & dd if=/proc/net/dev bs=4096
| Inter-|   Receive                                                |  Transmit
|  face |bytes    packets errs drop fifo frame compressed multicast|bytes    
| packets errs drop fifo colls carrier compressed
|     lo:    1036      13    0    0    0     0          0         0     1036      
| dummy0:       0       0    0    0    0     0          0         0        0       
|  tunl0:       0       0    0    0    0     0          0         0        0       
|   gre0:       0       0    0    0    0     0          0         0        0       
|   sit0:       0       0    0    0    0     0          0         0        0       
|   eth0: 1182386   18424    0    0    0     0          0         0 11838659   
|   eth1:30499791987 20594094    0    0    0     0          0         0 
|   eth2:184353121774 125264473    0    0    0     0          0         0 
|   hsi0:123569282529 3827611    0    0    0     0          0         0 
| 0+1 records in
| 0+1 records out
| 
| All net devices are shown.

Weird one to me.  Maybe someone else knows...

You were doing this test in an X terminal window, right?
and not on a text-only console?

The reason that I say that is that I can reproduce this problem on
2.5.68, but only in an xterm or similar window, but when I switch back
to a console, the entire device list is displayed.

???

--
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-05-01 21:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 12:34 [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net devices Christian Bornträger
2003-04-29 16:28 ` Randy.Dunlap
2003-04-29 20:07   ` Randy.Dunlap
2003-04-30  7:11     ` Christian Bornträger
2003-04-30 15:49       ` Randy.Dunlap
2003-04-30  8:12     ` Christian Bornträger
2003-05-01 21:12 ` Randy.Dunlap

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).