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 8F6C1A0C43; Fri, 15 Oct 2021 21:03:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0853C4114B; Fri, 15 Oct 2021 21:02:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 82B8240042 for ; Fri, 15 Oct 2021 21:02:53 +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 19FIukqx020995; Fri, 15 Oct 2021 12:02:53 -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=tvEfQNWr8T2KzwWxCwTfryaZQXFwrVoQ0RSDMncYBTM=; b=e8X3rY4XCit0oTDq8u4VEAGDgiY7NZN/5N8FbpHe1IEDdYzJZyZh7PcktEdmVf9yNVEa ujBhoQTtXQxqs+bZDs93cF8Zg6aj/D8PIxr7GgbNv6TY5ZJBZ5D4MU6r9xXBa0QZ3Rtk GGA7PWcqycrp6XMgYzcw0fCf7iLfEE1u3T5H+/THN+5VQk69Cf8y7PVsaNDE7KtpbVKN 4AWPh0Nn6fLp750Q/teHp9K+mRg+/xPhGVY3r+OxzcqmQA6csyNr90hdgUlv/um/jPJS I2Xtib5P+Zn4hh+oW01EHgbggrLRCbonruo3z9AmPeCrujnwn6c5kd5Pu/zTwpD9i3rK KQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3bq6gta8ec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 Oct 2021 12:02:52 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 15 Oct 2021 12:02:50 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 15 Oct 2021 12:02:50 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176]) by maili.marvell.com (Postfix) with ESMTP id DF1A35B6928; Fri, 15 Oct 2021 12:02:47 -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: Sat, 16 Oct 2021 00:32:12 +0530 Message-ID: <20211015190221.2160-5-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211015190221.2160-1-pbhagavatula@marvell.com> References: <20211006065012.16508-1-pbhagavatula@marvell.com> <20211015190221.2160-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: kIg8065L34p_M34m-fO7fqoY98teykSy X-Proofpoint-ORIG-GUID: kIg8065L34p_M34m-fO7fqoY98teykSy 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-15_06,2021-10-14_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v4 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 --- 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