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 5D88E45AB8; Sat, 5 Oct 2024 09:27:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3375043332; Sat, 5 Oct 2024 09:26:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 05C0C4332A for ; Sat, 5 Oct 2024 09:26:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4956tDXk025814; Sat, 5 Oct 2024 00:26:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=D 92h1U+b4SRBMTqBWxsAOah1Zh/ebIpeR5Ke/xVZn9s=; b=bQy3gi7N72MBvGlUe CLaCz2h1B8xBqg325tsWa6a77HDf47wyqyanf202N6FqFBE4SzW8AfQZcrdNL2+X SsskJq0zZTSdx49QXqfBvUiZvQPsBD6D7UDzNL1OlffuxUgUPXIpTLBdpXVEx76b w9u2EGEanNyvFEvKpUiLtzCnO5ssJE2RyOC1c2HTzEIzveNmtok0g41QyvNuMRb9 Eo9yTwN0gcdowsm852Px78oyFIFOosrHWs8gMarlsqJHSEC9VANWJHygDyAjPybV upBzWzosEBDznlySD64phx523ALsbj2lmVL4012CGCDogy/TK8HSs/WjkHg77i0N 7bOIw== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 422xpb05v9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 05 Oct 2024 00:26:41 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 5 Oct 2024 00:26:39 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Sat, 5 Oct 2024 00:26:39 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 57D603F7055; Sat, 5 Oct 2024 00:26:34 -0700 (PDT) From: To: , , , , , , , , , , Radu Nicolau , Akhil Goyal , Sunil Kumar Kori , Pavan Nikhilesh CC: Subject: [PATCH v6 6/6] examples: use eventdev pre-scheduling Date: Sat, 5 Oct 2024 12:56:00 +0530 Message-ID: <20241005072600.7962-7-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241005072600.7962-1-pbhagavatula@marvell.com> References: <20241004162451.6842-1-pbhagavatula@marvell.com> <20241005072600.7962-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: s6xFRyeUC2hadvRjBWtptsEf84EJzl1O X-Proofpoint-GUID: s6xFRyeUC2hadvRjBWtptsEf84EJzl1O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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 From: Pavan Nikhilesh Enable event pre-scheduling if supported by the event device. Signed-off-by: Pavan Nikhilesh --- examples/eventdev_pipeline/pipeline_worker_generic.c | 6 ++++++ examples/eventdev_pipeline/pipeline_worker_tx.c | 6 ++++++ examples/ipsec-secgw/event_helper.c | 6 ++++++ examples/l2fwd-event/l2fwd_event_generic.c | 6 ++++++ examples/l2fwd-event/l2fwd_event_internal_port.c | 6 ++++++ examples/l3fwd/l3fwd_event_generic.c | 6 ++++++ examples/l3fwd/l3fwd_event_internal_port.c | 6 ++++++ 7 files changed, 42 insertions(+) diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c index 831d7fd53d..06384c683c 100644 --- a/examples/eventdev_pipeline/pipeline_worker_generic.c +++ b/examples/eventdev_pipeline/pipeline_worker_generic.c @@ -192,6 +192,12 @@ setup_eventdev_generic(struct worker_data *worker_data) config.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + config.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + config.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(dev_id, &config); if (ret < 0) { printf("%d: Error configuring device\n", __LINE__); diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c index 98a52f3892..c9a04cad56 100644 --- a/examples/eventdev_pipeline/pipeline_worker_tx.c +++ b/examples/eventdev_pipeline/pipeline_worker_tx.c @@ -505,6 +505,12 @@ setup_eventdev_worker_tx_enq(struct worker_data *worker_data) config.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + config.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + config.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(dev_id, &config); if (ret < 0) { printf("%d: Error configuring device\n", __LINE__); diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c index 89fb7e62a5..dadddcb306 100644 --- a/examples/ipsec-secgw/event_helper.c +++ b/examples/ipsec-secgw/event_helper.c @@ -669,6 +669,12 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf) eventdev_conf.nb_event_port_enqueue_depth = evdev_default_conf.max_event_port_enqueue_depth; + if (evdev_default_conf.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + eventdev_conf.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (evdev_default_conf.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + eventdev_conf.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + /* Configure event device */ ret = rte_event_dev_configure(eventdev_id, &eventdev_conf); if (ret < 0) { diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c index 1977e23261..d805264744 100644 --- a/examples/l2fwd-event/l2fwd_event_generic.c +++ b/examples/l2fwd-event/l2fwd_event_generic.c @@ -86,6 +86,12 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc) evt_rsrc->has_burst = !!(dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE); + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(event_d_id, &event_d_conf); if (ret < 0) rte_panic("Error in configuring event device\n"); diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c index 717a7bceb8..26233d1ab6 100644 --- a/examples/l2fwd-event/l2fwd_event_internal_port.c +++ b/examples/l2fwd-event/l2fwd_event_internal_port.c @@ -82,6 +82,12 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc) evt_rsrc->has_burst = !!(dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE); + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(event_d_id, &event_d_conf); if (ret < 0) rte_panic("Error in configuring event device\n"); diff --git a/examples/l3fwd/l3fwd_event_generic.c b/examples/l3fwd/l3fwd_event_generic.c index ddb6e5c38d..d86439df52 100644 --- a/examples/l3fwd/l3fwd_event_generic.c +++ b/examples/l3fwd/l3fwd_event_generic.c @@ -74,6 +74,12 @@ l3fwd_event_device_setup_generic(void) evt_rsrc->has_burst = !!(dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE); + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(event_d_id, &event_d_conf); if (ret < 0) rte_panic("Error in configuring event device\n"); diff --git a/examples/l3fwd/l3fwd_event_internal_port.c b/examples/l3fwd/l3fwd_event_internal_port.c index cb49a8b9fa..b390e3469d 100644 --- a/examples/l3fwd/l3fwd_event_internal_port.c +++ b/examples/l3fwd/l3fwd_event_internal_port.c @@ -73,6 +73,12 @@ l3fwd_event_device_setup_internal_port(void) evt_rsrc->has_burst = !!(dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE); + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE; + + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE) + event_d_conf.preschedule_type = RTE_EVENT_PRESCHEDULE_ADAPTIVE; + ret = rte_event_dev_configure(event_d_id, &event_d_conf); if (ret < 0) rte_panic("Error in configuring event device\n"); -- 2.25.1