safchain/ethtool

operation not supported

alwqx opened this issue · 0 comments

alwqx commented

Env

  • CentOS 7 64bit
  • Golang 1.7

My machine has enp8s0 interface.I run into operation not supported error when run below code:

package main
 
 import(
     "fmt"
     "net"
     "log"
     "github.com/safchain/ethtool"
 )
 
 func main() {
     fmt.Println(test1("enp8s0"))
 }
 
 func test1(netName string) uint32 {
     ecmd := ethtool.EthtoolCmd{}
     ret, err := ecmd.CmdGet(netName)
 
     if err != nil {
         log.Fatal("get speed error:", err)
     }   
 
     return ret 
 }