aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-07-17 15:56:22 -0700
committerBen Pfaff <blp@nicira.com>2013-07-26 10:20:04 -0700
commit6dc34a0dab88c90252c0c682380579c45b74428b (patch)
tree23925a9fad037ae4533a6a6e8995efcb9522914b /lib/netdev.c
parentbe0c30df01b768f1b21e320668c081c618336f0f (diff)
Implement OpenFlow 1.3 queue stats duration feature.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/netdev.c')
-rw-r--r--lib/netdev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/netdev.c b/lib/netdev.c
index 727c538a..6e2a92fc 100644
--- a/lib/netdev.c
+++ b/lib/netdev.c
@@ -1246,7 +1246,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)
@@ -1258,7 +1259,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;
}