From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99D8BA0C45; Tue, 19 Oct 2021 01:36:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1D29410EA; Tue, 19 Oct 2021 01:36:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id DB953410E8 for ; Tue, 19 Oct 2021 01:36:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19IK0YQw001417; Mon, 18 Oct 2021 16:36:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=347LdPU+7IgnYaidzjIZAva6J8beA/mxGP62UpxbvAc=; b=OIAyvQ9JZ1YaV9YpkkmL1JdxjdbBLh7UwYM4pWZznuIrPgLOeeIyRybLK/KlFKQnV2fV lmB1JNdWwpunOoSL2FmwRoUK93AO1mzwwkgcDqs8IQCsDyVXwfLgncK5oJo9ksBeLydp xJ6oUST4JnG8NOjUtpf32rXslc36UHnLW/Z4ukp9UeEXp18UiJOKnwAocUq70c1ZrK1K GKz1eJY6af8UqacPOt4exl2HIekIXBmIgLqd9zgAJa1DN3fRhfNKMJ1G8tBvnI93013d IfpqRm18pR1U2a8fkyPTXDRftpowdaNHsHyh1hM1ek1Z1LteUsrRLtWZ/wz2eTItwlWm GQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3bsfk48mxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Oct 2021 16:36:41 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 18 Oct 2021 16:36:39 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 18 Oct 2021 16:36:39 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176]) by maili.marvell.com (Postfix) with ESMTP id 6D1853F7043; Mon, 18 Oct 2021 16:36:35 -0700 (PDT) From: To: , Hemant Agrawal , Nipun Gupta , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Liang Ma , "Peter Mccarthy" , Harry van Haaren CC: , Pavan Nikhilesh Date: Tue, 19 Oct 2021 05:06:00 +0530 Message-ID: <20211018233610.5694-5-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211018233610.5694-1-pbhagavatula@marvell.com> References: <20211015190221.2160-1-pbhagavatula@marvell.com> <20211018233610.5694-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: rDHPDhrB4rUa2yhCmr-gOCgxz46xR6xg X-Proofpoint-GUID: rDHPDhrB4rUa2yhCmr-gOCgxz46xR6xg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_07,2021-10-18_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH v5 05/14] drivers/event: invoke probing finish function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh 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.17.1