+static void
+ofp_print_queue_name(struct ds *string, uint32_t queue_id)
+{
+ if (queue_id == OFPQ_ALL) {
+ ds_put_cstr(string, "ALL");
+ } else {
+ ds_put_format(string, "%"PRIu32, queue_id);
+ }
+}
+
+static void
+ofp_queue_stats_request(struct ds *string, const void *body_,
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
+{
+ const struct ofp_queue_stats_request *qsr = body_;
+
+ ds_put_cstr(string, "port=");
+ ofp_print_port_name(string, ntohs(qsr->port_no));
+
+ ds_put_cstr(string, " queue=");
+ ofp_print_queue_name(string, ntohl(qsr->queue_id));
+}
+
+static void
+ofp_queue_stats_reply(struct ds *string, const void *body, size_t len,
+ int verbosity)
+{
+ const struct ofp_queue_stats *qs = body;
+ size_t n = len / sizeof *qs;
+ ds_put_format(string, " %zu queues\n", n);
+ if (verbosity < 1) {
+ return;
+ }
+
+ for (; n--; qs++) {
+ ds_put_cstr(string, " port ");
+ ofp_print_port_name(string, ntohs(qs->port_no));
+ ds_put_cstr(string, " queue ");
+ ofp_print_queue_name(string, ntohl(qs->queue_id));
+ ds_put_cstr(string, ": ");
+
+ print_port_stat(string, "bytes=", ntohll(qs->tx_bytes), 1);
+ print_port_stat(string, "pkts=", ntohll(qs->tx_packets), 1);
+ print_port_stat(string, "errors=", ntohll(qs->tx_errors), 0);
+ }
+}
+