From: Ben Pfaff Date: Fri, 6 Mar 2009 18:58:13 +0000 (-0800) Subject: netdev: Don't log a warning for unsupported ethtool operations. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4d223c2cd31776ae95b338c06b2db0bb1f3a5d;p=openvswitch netdev: Don't log a warning for unsupported ethtool operations. Plenty of devices don't support ethtool, and we don't use ethtool for anything essential, so there's no point in logging a warning here. --- diff --git a/lib/netdev.c b/lib/netdev.c index 95d3d2c3..f754cad3 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -203,8 +203,14 @@ do_ethtool(struct netdev *netdev, struct ethtool_cmd *ecmd, if (ioctl(netdev->netdev_fd, SIOCETHTOOL, &ifr) == 0) { return 0; } else { - VLOG_WARN_RL(&rl, "ethtool command %s on network device %s failed: %s", - cmd_name, netdev->name, strerror(errno)); + if (errno != EOPNOTSUPP) { + VLOG_WARN_RL(&rl, "ethtool command %s on network device %s " + "failed: %s", cmd_name, netdev->name, + strerror(errno)); + } else { + /* The device doesn't support this operation. That's pretty + * common, so there's no point in logging anything. */ + } return errno; } }