fix compilation error on 386
Update github.com/safchain/ethtool to fix the compilation error on 386. Also added 386 to the tarvis yaml. Fixes #322 Signed-off-by: Moshe Levi <moshele@mellanox.com>
This commit is contained in:
7
vendor/github.com/safchain/ethtool/ethtool_cmd.go
generated
vendored
7
vendor/github.com/safchain/ethtool/ethtool_cmd.go
generated
vendored
@ -26,6 +26,7 @@
|
||||
package ethtool
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
@ -128,6 +129,9 @@ func (e *Ethtool) CmdGet(ecmd *EthtoolCmd, intf string) (uint32, error) {
|
||||
|
||||
var speedval uint32 = (uint32(ecmd.Speed_hi) << 16) |
|
||||
(uint32(ecmd.Speed) & 0xffff)
|
||||
if speedval == math.MaxUint16 {
|
||||
speedval = math.MaxUint32
|
||||
}
|
||||
|
||||
return speedval, nil
|
||||
}
|
||||
@ -153,6 +157,9 @@ func (e *Ethtool) CmdSet(ecmd *EthtoolCmd, intf string) (uint32, error) {
|
||||
|
||||
var speedval uint32 = (uint32(ecmd.Speed_hi) << 16) |
|
||||
(uint32(ecmd.Speed) & 0xffff)
|
||||
if speedval == math.MaxUint16 {
|
||||
speedval = math.MaxUint32
|
||||
}
|
||||
|
||||
return speedval, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user