event/sw: fix mapped qid count with parallel queue
[dpdk.git] / drivers / event / sw / sw_evdev.c
index a31aaa6..bc834a9 100644 (file)
@@ -90,7 +90,8 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[],
                } else if (q->type == RTE_SCHED_TYPE_ORDERED) {
                        p->num_ordered_qids++;
                        p->num_qids_mapped++;
-               } else if (q->type == RTE_SCHED_TYPE_ATOMIC) {
+               } else if (q->type == RTE_SCHED_TYPE_ATOMIC ||
+                               q->type == RTE_SCHED_TYPE_PARALLEL) {
                        p->num_qids_mapped++;
                }
 
@@ -559,12 +560,13 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
                                inflights += qid->fids[flow].pcount;
                        }
 
-               uint32_t cq;
-               fprintf(f, "\tInflights: %u\tFlows pinned per port: ",
-                               inflights);
-               for (cq = 0; cq < sw->port_count; cq++)
-                       fprintf(f, "%d ", affinities_per_port[cq]);
-               fprintf(f, "\n");
+               uint32_t port;
+               fprintf(f, "\tPer Port Stats:\n");
+               for (port = 0; port < sw->port_count; port++) {
+                       fprintf(f, "\t  Port %d: Pkts: %"PRIu64, port,
+                                       qid->to_port[port]);
+                       fprintf(f, "\tFlows: %d\n", affinities_per_port[port]);
+               }
 
                uint32_t iq;
                uint32_t iq_printed = 0;