diff --git a/ioctl_linux.go b/ioctl_linux.go index a850312..f0b9129 100644 --- a/ioctl_linux.go +++ b/ioctl_linux.go @@ -56,14 +56,6 @@ type ethtoolSset struct { data [1]uint32 } -// ethtoolGstrings is string set for data tagging -type ethtoolGstrings struct { - cmd uint32 - stringSet uint32 - length uint32 - data [32]byte -} - type ethtoolStats struct { cmd uint32 nStats uint32 diff --git a/link_linux.go b/link_linux.go index 5318c2c..b16a772 100644 --- a/link_linux.go +++ b/link_linux.go @@ -2933,20 +2933,9 @@ func VethPeerIndex(link *Veth) (int, error) { return -1, fmt.Errorf("SIOCETHTOOL request for %q failed, errno=%v", link.Attrs().Name, errno) } - gstrings := ðtoolGstrings{ - cmd: ETHTOOL_GSTRINGS, - stringSet: ETH_SS_STATS, - length: sSet.data[0], - } - ifreq.Data = uintptr(unsafe.Pointer(gstrings)) - _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), SIOCETHTOOL, uintptr(unsafe.Pointer(ifreq))) - if errno != 0 { - return -1, fmt.Errorf("SIOCETHTOOL request for %q failed, errno=%v", link.Attrs().Name, errno) - } - stats := ðtoolStats{ cmd: ETHTOOL_GSTATS, - nStats: gstrings.length, + nStats: sSet.data[0], } ifreq.Data = uintptr(unsafe.Pointer(stats)) _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), SIOCETHTOOL, uintptr(unsafe.Pointer(ifreq)))