#include <rte_event_ring.h>
#include "sw_evdev.h"
-#include "iq_ring.h"
+#include "iq_chunk.h"
enum xstats_type {
/* common stats */
/* device instance specific */
no_iq_enq,
no_cq_enq,
+ sched_last_iter_bitmask,
+ sched_progress_last_iter,
/* port_specific */
rx_used,
rx_free,
pkt_cycles,
poll_return, /* for zero-count and used also for port bucket loop */
/* qid_specific */
- iq_size,
iq_used,
/* qid port mapping specific */
pinned,
case calls: return sw->sched_called;
case no_iq_enq: return sw->sched_no_iq_enqueues;
case no_cq_enq: return sw->sched_no_cq_enqueues;
+ case sched_last_iter_bitmask: return sw->sched_last_iter_bitmask;
+ case sched_progress_last_iter: return sw->sched_progress_last_iter;
+
default: return -1;
}
}
return infl;
} while (0);
break;
- case iq_size: return RTE_DIM(qid->iq[0]->ring);
default: return -1;
}
}
const int iq_idx = extra_arg;
switch (type) {
- case iq_used: return iq_ring_count(qid->iq[iq_idx]);
+ case iq_used: return iq_count(&qid->iq[iq_idx]);
default: return -1;
}
}
*/
static const char * const dev_stats[] = { "rx", "tx", "drop",
"sched_calls", "sched_no_iq_enq", "sched_no_cq_enq",
+ "sched_last_iter_bitmask", "sched_progress_last_iter",
};
static const enum xstats_type dev_types[] = { rx, tx, dropped,
- calls, no_iq_enq, no_cq_enq,
+ calls, no_iq_enq, no_cq_enq, sched_last_iter_bitmask,
+ sched_progress_last_iter,
};
/* all device stats are allowed to be reset */
/* all bucket dequeues are allowed to be reset, handled in loop below */
static const char * const qid_stats[] = {"rx", "tx", "drop",
- "inflight", "iq_size"
+ "inflight"
};
static const enum xstats_type qid_types[] = { rx, tx, dropped,
- inflight, iq_size
+ inflight
};
static const uint8_t qid_reset_allowed[] = {1, 1, 1,
- 0, 0
+ 0
};
static const char * const qid_iq_stats[] = { "used" };
const struct sw_evdev *sw = sw_pmd_priv_const(dev);
unsigned int i;
unsigned int xidx = 0;
- RTE_SET_USED(mode);
- RTE_SET_USED(queue_port_id);
uint32_t xstats_mode_count = 0;
uint32_t start_offset = 0;
values[xidx] = val;
if (xs->reset_allowed && reset)
- xs->reset_value = val;
+ xs->reset_value += val;
xidx++;
}
if (!xs->reset_allowed)
continue;
- uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg)
- - xs->reset_value;
+ uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg);
xs->reset_value = val;
}
}