Bug 11620 - tun device's speed is set to just 10mbps
Summary: tun device's speed is set to just 10mbps
Status: REJECTED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 03:56 UTC by dayasankar
Modified: 2008-09-22 16:38 UTC (History)
0 users

See Also:
Kernel Version: 2.6.24-19-generic
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description dayasankar 2008-09-22 03:56:08 UTC
Latest working kernel version:2.6.24-19-generic
Earliest failing kernel version:
Distribution:
Hardware Environment:
Software Environment:linux- ubuntu
Problem Description: When I open tun device, speed is set to 10mbps and I am not able to change it to 100 Mbps

Steps to reproduce:

1) here is ioctl stuff my tun device

        if (device) strncpy(tun->ifr.ifr_name, device, IFNAMSIZ);
        tun->ifr.ifr_flags=(flags)?flags:IFF_TUN|IFF_NO_PI;
        tun->fd=open("/dev/net/tun", O_RDWR);
        //#ioctl(tun->fd, TUNSETIFF, (void *) &(tun->ifr));
        ioctl(tun->fd, TUNSETIFF, (void *) &(tun->ifr));
        ioctl(tun->fd,TUNSETPERSIST,1);
        ioctl(tun->fd,TUNSETOWNER,500);
        return (PyObject *)tun;

2) Once I create tun device, here are properties of my tun device

root@daya-desktop:/home/daya/tuntap-0.1# ethtool tun0
Settings for tun0:
	Supported ports: [ ]
	Supported link modes:   
	Supports auto-negotiation: No
	Advertised link modes:  Not reported
	Advertised auto-negotiation: No
	Speed: 10Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: off
	Current message level: 0xffffffa1 (-95)
	Link detected: no

3) When I tried to change the speed, it is throwing the following error

root@daya-desktop:/home/daya/tuntap-0.1# ethtool -s tun0 speed 100
Cannot set new settings: Operation not supported
  not setting speed

root@daya-desktop:/home/daya/tuntap-0.1# ifconfig tun0 media 100
port: SIOCSIFMAP: Operation not supported
Comment 1 Anonymous Emailer 2008-09-22 16:17:44 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Mon, 22 Sep 2008 03:56:08 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=11620
> 
>            Summary: tun device's speed is set to ony 10mbps
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.24-19-generic

2.6.24-19-generic fails

>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Network
>         AssignedTo: jgarzik@pobox.com
>         ReportedBy: dayasankar@movik.net
> 
> 
> Latest working kernel version:2.6.24-19-generic

2.6.24-19-generic does not fail.

Please clarify: which kernel version failed and whcih version did not?

Thanks.

> Earliest failing kernel version:
> Distribution:
> Hardware Environment:
> Software Environment:linux- ubuntu
> Problem Description: When I open tun device, speed is set to 10mbps and I am
> not able to change it to 100 Mbps
> 
> Steps to reproduce:
> 
> 1) here is ioctl stuff my tun device
> 
>         if (device) strncpy(tun->ifr.ifr_name, device, IFNAMSIZ);
>         tun->ifr.ifr_flags=(flags)?flags:IFF_TUN|IFF_NO_PI;
>         tun->fd=open("/dev/net/tun", O_RDWR);
>         //#ioctl(tun->fd, TUNSETIFF, (void *) &(tun->ifr));
>         ioctl(tun->fd, TUNSETIFF, (void *) &(tun->ifr));
>         ioctl(tun->fd,TUNSETPERSIST,1);
>         ioctl(tun->fd,TUNSETOWNER,500);
>         return (PyObject *)tun;
> 
> 2) Once I create tun device, here are properties of my tun device
> 
> root@daya-desktop:/home/daya/tuntap-0.1# ethtool tun0
> Settings for tun0:
>         Supported ports: [ ]
>         Supported link modes:   
>         Supports auto-negotiation: No
>         Advertised link modes:  Not reported
>         Advertised auto-negotiation: No
>         Speed: 10Mb/s
>         Duplex: Full
>         Port: Twisted Pair
>         PHYAD: 0
>         Transceiver: internal
>         Auto-negotiation: off
>         Current message level: 0xffffffa1 (-95)
>         Link detected: no
> 
> 3) When I tried to change the speed, it is throwing the following error
> 
> root@daya-desktop:/home/daya/tuntap-0.1# ethtool -s tun0 speed 100
> Cannot set new settings: Operation not supported
>   not setting speed
> 
> root@daya-desktop:/home/daya/tuntap-0.1# ifconfig tun0 media 100
> port: SIOCSIFMAP: Operation not supported
Comment 2 David S. Miller 2008-09-22 16:20:32 UTC
TUN is a virtual device, not a physical one, it is just reporting
arbitrary values for things like link speed so that other aspects can
be discovered by standard tools (such as link state and offloading
features).

Please close this bug.

Note You need to log in before you can comment on or make changes to this bug.