From: Stephen Hemminger <hidden> Date: 2004-08-06 21:39:28
Here is a redo of the patch to propagate ethtool and mii ioctl's
on vlan's to the underlying real device. This time the request
is copied to a new buffer, to avoid the colon name rewrite issues.
Signed-off-by: Stephen Hemminger <redacted>
diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c
@@ -358,6 +358,7 @@new_dev->set_mac_address=vlan_dev_set_mac_address;new_dev->set_multicast_list=vlan_dev_set_multicast_list;new_dev->destructor=free_netdev;+new_dev->do_ioctl=vlan_dev_ioctl;}/* Attach a VLAN device to a mac address (ie Ethernet Card).
@@ -757,6 +757,34 @@vlan_flush_mc_list(dev);return0;}++intvlan_dev_ioctl(structnet_device*dev,structifreq*ifr,intcmd)+{+structnet_device*real_dev=VLAN_DEV_INFO(dev)->real_dev;+structifreqifrr;+interr=-EOPNOTSUPP;++strncpy(ifrr.ifr_name,real_dev->name,IFNAMSIZ);+ifrr.ifr_ifru=ifr->ifr_ifru;++switch(cmd){+caseSIOCGMIIPHY:+caseSIOCGMIIREG:+caseSIOCSMIIREG:+if(real_dev->do_ioctl&&netif_device_present(real_dev))+err=real_dev->do_ioctl(dev,&ifrr,cmd);+break;++caseSIOCETHTOOL:+err=dev_ethtool(&ifrr);+}++if(!err)+ifr->ifr_ifru=ifrr.ifr_ifru;++returnerr;+}+/** Taken from Gleb + Lennert's VLAN code, and modified... */voidvlan_dev_set_multicast_list(structnet_device*vlan_dev){
On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote:
Here is a redo of the patch to propagate ethtool and mii ioctl's
on vlan's to the underlying real device. This time the request
is copied to a new buffer, to avoid the colon name rewrite issues.
Is this really what we want? We also don't make virtual IPs appear as real
interfaces anymore. Virtual devices are just that - virtual.
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote:
quoted
Here is a redo of the patch to propagate ethtool and mii ioctl's
on vlan's to the underlying real device. This time the request
is copied to a new buffer, to avoid the colon name rewrite issues.
Is this really what we want? We also don't make virtual IPs appear as real
interfaces anymore. Virtual devices are just that - virtual.
Hi Bert,
Please don't be so absolute. For example, if the virtual device "link" status
doesn't reflect that of the real device then routing software needs to parse
the virtual->real device mappings (a parsing for which Linux provides only
limited support).
Worse still, we now need to special-case virtual interfaces in application
code:
while (virtual_interface(interface_name)) {
virtual_to_real(interface_name, &interface_name);
}
This is the sort of nasty detail than operating systems are meant to abstract
away from application code.
Thanks,
Glen
On Sun, Aug 08, 2004 at 02:08:36PM +0930, Glen Turner wrote:
while (virtual_interface(interface_name)) {
virtual_to_real(interface_name, &interface_name);
}
This is the sort of nasty detail than operating systems are meant to
abstract away from application code.
What I'm saying is that even userspace should not offer this abstraction.
Remember the past confusion over "ifconfig eth0:1 down" ?
But I'm more than prepared to follow DaveM's lead here, I just want to be
sure people think about this change.
Regards,
bert
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
From: Stephen Hemminger <hidden> Date: 2004-08-09 15:53:48
On Sat, 7 Aug 2004 23:10:37 +0200
bert hubert [off-list ref] wrote:
On Fri, Aug 06, 2004 at 02:39:28PM -0700, Stephen Hemminger wrote:
quoted
Here is a redo of the patch to propagate ethtool and mii ioctl's
on vlan's to the underlying real device. This time the request
is copied to a new buffer, to avoid the colon name rewrite issues.
Is this really what we want? We also don't make virtual IPs appear as real
interfaces anymore. Virtual devices are just that - virtual.
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
The problem is that the bridge code (and bonding) want to be able to send ethtool
ioctl's to the device. The bridge wants it to find out the speed of the device
to set the spanning tree values appropriately.
I would rather not special case VLAN's.
From: David S. Miller <hidden> Date: 2004-08-09 23:45:27
On Fri, 6 Aug 2004 14:39:28 -0700
Stephen Hemminger [off-list ref] wrote:
Here is a redo of the patch to propagate ethtool and mii ioctl's
on vlan's to the underlying real device. This time the request
is copied to a new buffer, to avoid the colon name rewrite issues.