- * Returns 0 if successful, otherwise a positive errno value. On error, some
- * configured queues may not have been included in the iteration. */
+ * Failure might indicate an actual error or merely that the last queue has
+ * been dumped. An error status for the entire dump operation is provided when
+ * it is completed by calling netdev_queue_dump_done().
+ *
+ * The returned contents of 'details' should be documented as valid for the
+ * given 'type' in the "other_config" column in the "Queue" table in
+ * vswitchd/vswitch.xml (which is built as ovs-vswitchd.conf.db(8)).
+ *
+ * The caller must initialize 'details' (e.g. with smap_init()) before calling
+ * this function. This function will clear and replace its contents. The
+ * caller must free 'details' when it is no longer needed (e.g. with
+ * smap_destroy()). */
+bool
+netdev_queue_dump_next(struct netdev_queue_dump *dump,
+ unsigned int *queue_id, struct smap *details)
+{
+ const struct netdev *netdev = dump->netdev;
+
+ if (dump->error) {
+ return false;
+ }
+
+ dump->error = netdev->netdev_class->queue_dump_next(netdev, dump->state,
+ queue_id, details);
+
+ if (dump->error) {
+ netdev->netdev_class->queue_dump_done(netdev, dump->state);
+ return false;
+ }
+ return true;
+}
+
+/* Completes queue table dump operation 'dump', which must have been
+ * initialized with netdev_queue_dump_start(). Returns 0 if the dump operation
+ * was error-free, otherwise a positive errno value describing the problem. */