From 85be99719a0cd9f2ac9e507ba99e3e4f4233a285 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Tue, 19 Oct 2021 05:06:00 +0530 Subject: [PATCH] drivers/event: invoke probing finish function Invoke event_dev_probing_finish() function at the end of probing, this function sets the function pointers in the fp_ops flat array. Signed-off-by: Pavan Nikhilesh Acked-by: Hemant Agrawal --- drivers/event/dpaa/dpaa_eventdev.c | 4 +++- drivers/event/dpaa2/dpaa2_eventdev.c | 4 +++- drivers/event/dsw/dsw_evdev.c | 1 + drivers/event/octeontx/ssovf_evdev.c | 1 + drivers/event/opdl/opdl_evdev.c | 4 +++- drivers/event/skeleton/skeleton_eventdev.c | 1 + drivers/event/sw/sw_evdev.c | 2 ++ 7 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 9f14390d28..14ca341829 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -1026,10 +1026,12 @@ dpaa_event_dev_create(const char *name, const char *params) /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; + goto done; priv->max_event_queues = DPAA_EVENT_MAX_QUEUES; +done: + event_dev_probing_finish(eventdev); return 0; fail: return -EFAULT; diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index d577f64824..1d3ad8ffd6 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -1110,7 +1110,7 @@ dpaa2_eventdev_create(const char *name) /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; + goto done; priv = eventdev->data->dev_private; priv->max_event_queues = 0; @@ -1139,6 +1139,8 @@ dpaa2_eventdev_create(const char *name) RTE_LOG(INFO, PMD, "%s eventdev created\n", name); +done: + event_dev_probing_finish(eventdev); return 0; fail: return -EFAULT; diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 01f060fff3..17568967be 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -448,6 +448,7 @@ dsw_probe(struct rte_vdev_device *vdev) dsw = dev->data->dev_private; dsw->data = dev->data; + event_dev_probing_finish(dev); return 0; } diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 4a8c6a13a5..eb80eeafe1 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -933,6 +933,7 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev) edev->max_event_ports); ssovf_init_once = 1; + event_dev_probing_finish(eventdev); return 0; error: diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index 739dc64c82..5007e9a7bf 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -720,7 +720,7 @@ opdl_probe(struct rte_vdev_device *vdev) dev->dequeue_burst = opdl_event_dequeue_burst; if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; + goto done; opdl = dev->data->dev_private; opdl->data = dev->data; @@ -733,6 +733,8 @@ opdl_probe(struct rte_vdev_device *vdev) if (do_test == 1) test_result = opdl_selftest(); +done: + event_dev_probing_finish(dev); return test_result; } diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index c9e17e7cb1..af0efb3302 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -443,6 +443,7 @@ skeleton_eventdev_create(const char *name, int socket_id) eventdev->dequeue = skeleton_eventdev_dequeue; eventdev->dequeue_burst = skeleton_eventdev_dequeue_burst; + event_dev_probing_finish(eventdev); return 0; fail: return -EFAULT; diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 9b72073322..e99b47afbe 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -1124,6 +1124,8 @@ sw_probe(struct rte_vdev_device *vdev) dev->data->service_inited = 1; dev->data->service_id = sw->service_id; + event_dev_probing_finish(dev); + return 0; } -- 2.20.1