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 A370045A7B; Sun, 6 Oct 2024 19:07:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B25FF4066E; Sun, 6 Oct 2024 19:06:47 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EB54640661 for ; Sun, 6 Oct 2024 19:06:45 +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 496Gu9sJ019843; Sun, 6 Oct 2024 10:06:45 -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=C1cymPwILFDMTnuib QNmtce9n7emg90BdoXbVNfkmSx6rHETfhZu2pKKCM2Kam2LXnOIDXs6940+4+Ji3 Z3F/cZx87fT+KVaAcCRaQj70WPL5HWv4/D7QNYwIukukoYFH1txdRekffQTBpC+G g9yGiuINOchn/fJ6HYFEb42tM1BIc4UUSfSC9aW60AEkWpTS7MMFE2XXy7/AA9tu EcSzweDW1dPc0pgepOanxZnZ6UFQCvS0nhHsRvunCEpoc16ZtMqQUYYMJW41af3Z 4bwJiYnCgUqhsHbIbx3KicnTi3wPmVURv/rHJd6EcPjtaJpzAdJMI1WuJCIwxr+0 cc/jQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 4234yg1rb4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 06 Oct 2024 10:06:45 -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; Sun, 6 Oct 2024 10:06:43 -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; Sun, 6 Oct 2024 10:06:43 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id E7AF23F7044; Sun, 6 Oct 2024 10:06:38 -0700 (PDT) From: To: , , , , , , , , , , Radu Nicolau , Akhil Goyal , Sunil Kumar Kori , Pavan Nikhilesh CC: Subject: [PATCH v8 6/6] examples: use eventdev pre-scheduling Date: Sun, 6 Oct 2024 22:36:08 +0530 Message-ID: <20241006170608.14182-7-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241006170608.14182-1-pbhagavatula@marvell.com> References: <20241005080001.8681-1-pbhagavatula@marvell.com> <20241006170608.14182-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: k9uPsZLZUEml9MaxQ3zWWwUlEpk93x7A X-Proofpoint-ORIG-GUID: k9uPsZLZUEml9MaxQ3zWWwUlEpk93x7A 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