event/dlb: add xstats

Add support for DLB xstats.  Perform initialization and add
standard xstats entry points

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
This commit is contained in:
Timothy McDaniel 2020-11-01 17:30:01 -06:00 committed by Jerin Jacob
parent 813146cae3
commit 5993e5eb7d
3 changed files with 1236 additions and 0 deletions

View File

@ -71,6 +71,17 @@ static struct rte_event_dev_info evdev_dlb_default_info = {
struct process_local_port_data
dlb_port[DLB_MAX_NUM_PORTS][NUM_DLB_PORT_TYPES];
uint32_t
dlb_get_queue_depth(struct dlb_eventdev *dlb,
struct dlb_eventdev_queue *queue)
{
/* DUMMY FOR NOW So "xstats" patch compiles */
RTE_SET_USED(dlb);
RTE_SET_USED(queue);
return 0;
}
static int
dlb_hw_query_resources(struct dlb_eventdev *dlb)
{
@ -298,6 +309,11 @@ void
dlb_entry_points_init(struct rte_eventdev *dev)
{
static struct rte_eventdev_ops dlb_eventdev_entry_ops = {
.dump = dlb_eventdev_dump,
.xstats_get = dlb_eventdev_xstats_get,
.xstats_get_names = dlb_eventdev_xstats_get_names,
.xstats_get_by_name = dlb_eventdev_xstats_get_by_name,
.xstats_reset = dlb_eventdev_xstats_reset,
};
/* Expose PMD's eventdev interface */
@ -352,6 +368,13 @@ dlb_primary_eventdev_probe(struct rte_eventdev *dev,
return err;
}
/* Complete xtstats runtime initialization */
err = dlb_xstats_init(dlb);
if (err) {
DLB_LOG_ERR("dlb: failed to init xstats, err=%d\n", err);
return err;
}
rte_spinlock_init(&dlb->qm_instance.resource_lock);
dlb_iface_low_level_io_init(dlb);

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@ endif
sources = files('dlb.c',
'dlb_iface.c',
'dlb_xstats.c',
'pf/dlb_main.c',
'pf/dlb_pf.c',
'pf/base/dlb_resource.c'