Re: [libvirt] [PATCH] virNetDevGetLinkInfo: Don't report link speed if NIC's not up

2014-06-13 Thread Michal Privoznik
On 13.06.2014 12:25, Laine Stump wrote: On 06/13/2014 12:34 PM, Michal Privoznik wrote: The kernel's more broken than one would think. Various drivers report various (usually spurious) values if the interface is in other state than 'up' . While on some we experience -EINVAL when read()-ing the s

Re: [libvirt] [PATCH] virNetDevGetLinkInfo: Don't report link speed if NIC's not up

2014-06-13 Thread Laine Stump
On 06/13/2014 12:34 PM, Michal Privoznik wrote: > The kernel's more broken than one would think. Various drivers report > various (usually spurious) values if the interface is in other state > than 'up' . While on some we experience -EINVAL when read()-ing the > speed sysfs file, with other drivers

[libvirt] [PATCH] virNetDevGetLinkInfo: Don't report link speed if NIC's not up

2014-06-13 Thread Michal Privoznik
The kernel's more broken than one would think. Various drivers report various (usually spurious) values if the interface is in other state than 'up' . While on some we experience -EINVAL when read()-ing the speed sysfs file, with other drivers we might get anything from 0 to UINT_MAX. If that's the