2003-05-02 00:08:21

by Chuck Ebbert

[permalink] [raw]
Subject: Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net device

Randy Dunlap wrote:

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

There are strange bugs in the console layer and/or the VGA text console.
Choosing 34-line text mode results in a 30-line screen that the system
thinks has 34, with four 'hidden' lines at the bottom (on PCI TNT adapter.)
Maybe a similar thing is happening in X?

And BTW I found a way to get lots of network devices:

1. Load the gre tunneling driver (GRE tunnels over IP)
2. ip tunnel add gre1 mode gre remote 127.1.1.1 local 127.0.0.1 dev lo
3. Repeat for as many as you like... I can't make the kernel
send packets through them but they show up on the list.

------
Chuck


2003-05-02 01:21:36

by Randy.Dunlap

[permalink] [raw]
Subject: Re: [BUG 2.5.67 (and probably earlier)] /proc/dev/net doesnt show all net device

On Thu, 1 May 2003 20:16:00 -0400 Chuck Ebbert <[email protected]> wrote:

| Randy Dunlap wrote:
|
| > 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.
|
| There are strange bugs in the console layer and/or the VGA text console.
| Choosing 34-line text mode results in a 30-line screen that the system
| thinks has 34, with four 'hidden' lines at the bottom (on PCI TNT adapter.)
| Maybe a similar thing is happening in X?

I don't think it's quite as deep down as all that. I built cat.c with
some additional debugging fprintf()s in it. When I run it from the
text console, it tells me that the variable <outsize> is 4096
(derived from #define ST_BLKSIZE(statbuf) <about 4 different #defines>.

However, when run from an X terminal window, it tells me that outsize
is 1024.

I don't have time right now to dig into the 4 #defines for ST_BLKSIZE
to see where the problem is.

Anyway, it looks as though the kernel read function for /proc/net/dev
is filling up cat's buffer and just stopping, which seems OK to me.
Looks like a cat bug IMO, but I haven't finished looking at it.


| And BTW I found a way to get lots of network devices:
|
| 1. Load the gre tunneling driver (GRE tunnels over IP)
| 2. ip tunnel add gre1 mode gre remote 127.1.1.1 local 127.0.0.1 dev lo
| 3. Repeat for as many as you like... I can't make the kernel
| send packets through them but they show up on the list.

OK. Loading dummy driver multiple times is OK for this.

Later,
--
~Randy