X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev.c;fp=lib%2Fnetdev.c;h=a8bbedd71cd692b6afb705012d15ba9a59dee600;hb=d017eeb9f9ebcb46c24a67fd301b3e36cd26a04e;hp=76c87288a9cd2d30a938b72338760a7f3d8d61c5;hpb=cc36576070df622d0fc7a6e26ce01027e12b5b59;p=sliver-openvswitch.git diff --git a/lib/netdev.c b/lib/netdev.c index 76c87288a..a8bbedd71 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1248,7 +1248,8 @@ netdev_delete_queue(struct netdev *netdev, unsigned int queue_id) /* Obtains statistics about 'queue_id' on 'netdev'. On success, returns 0 and * fills 'stats' with the queue's statistics; individual members of 'stats' may * be set to all-1-bits if the statistic is unavailable. On failure, returns a - * positive errno value and fills 'stats' with all-1-bits. */ + * positive errno value and fills 'stats' with values indicating unsupported + * statistics. */ int netdev_get_queue_stats(const struct netdev *netdev, unsigned int queue_id, struct netdev_queue_stats *stats) @@ -1260,7 +1261,10 @@ netdev_get_queue_stats(const struct netdev *netdev, unsigned int queue_id, ? class->get_queue_stats(netdev, queue_id, stats) : EOPNOTSUPP); if (retval) { - memset(stats, 0xff, sizeof *stats); + stats->tx_bytes = UINT64_MAX; + stats->tx_packets = UINT64_MAX; + stats->tx_errors = UINT64_MAX; + stats->created = LLONG_MIN; } return retval; }