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 BB37145B96; Mon, 21 Oct 2024 22:58:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A89EC40662; Mon, 21 Oct 2024 22:58:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 444C14065A for ; Mon, 21 Oct 2024 22:58:12 +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 49LK49qo030193 for ; Mon, 21 Oct 2024 13:58:11 -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=u gYSsUgIIPhMT87rEarfOZR0erTmhvWPdVBY1rZIaX0=; b=hJ5pMJqGnrkegQstl hbXJLY946s3jY6zMAUFW/dDmQ11s/zkS+GD3cc0PYYxBAg1AG/wAChXFkvVo/3x/ p1MRbD8pPabUitLB9tu/QVBq6StxYQ0rleY1jX3AT5MYlyIo6UyQJCO/PDfEizLR EJlqkNelb5Yt8XxHN8OhKrfzixEY21OWCwWAI9K1v4g6utXLy6qGJaOzlEt4y1YF EMPTxCxhFxGxACUpC5FF9UZ2LVN1k7O3OvR2jsalh8iteN/uzdHUhfrwodFXvdrv Gr3JJ7L4eMZ2/XWqzbTQkRF0942zrdWM78dThLjmQbK/iOVQkcydZhAjlYg6XZEr CRtqA== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 42dwndg35q-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 21 Oct 2024 13:58:11 -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; Mon, 21 Oct 2024 13:58:10 -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; Mon, 21 Oct 2024 13:58:10 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 0630B3F7041; Mon, 21 Oct 2024 13:58:08 -0700 (PDT) From: To: , Pavan Nikhilesh , "Shijith Thotton" CC: Subject: [PATCH v2 09/21] event/cnxk: add CN20K event port profile switch Date: Tue, 22 Oct 2024 02:27:32 +0530 Message-ID: <20241021205745.7310-9-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241021205745.7310-1-pbhagavatula@marvell.com> References: <20241003132237.20193-1-pbhagavatula@marvell.com> <20241021205745.7310-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Ux0vGzoj-PKljnIc3Zhuq97q2Vtxqrop X-Proofpoint-GUID: Ux0vGzoj-PKljnIc3Zhuq97q2Vtxqrop 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 Add CN20K event port profile switch. Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cn20k_eventdev.c | 1 + drivers/event/cnxk/cn20k_worker.c | 11 +++++++++++ drivers/event/cnxk/cn20k_worker.h | 1 + 3 files changed, 13 insertions(+) diff --git a/drivers/event/cnxk/cn20k_eventdev.c b/drivers/event/cnxk/cn20k_eventdev.c index c435981fa0..13d293f1d3 100644 --- a/drivers/event/cnxk/cn20k_eventdev.c +++ b/drivers/event/cnxk/cn20k_eventdev.c @@ -122,6 +122,7 @@ cn20k_sso_fp_fns_set(struct rte_eventdev *event_dev) if (dev->deq_tmo_ns) event_dev->dequeue_burst = cn20k_sso_hws_tmo_deq_burst; + event_dev->profile_switch = cn20k_sso_hws_profile_switch; #else RTE_SET_USED(event_dev); #endif diff --git a/drivers/event/cnxk/cn20k_worker.c b/drivers/event/cnxk/cn20k_worker.c index 075461c3ff..224ab64b1e 100644 --- a/drivers/event/cnxk/cn20k_worker.c +++ b/drivers/event/cnxk/cn20k_worker.c @@ -379,6 +379,17 @@ cn20k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[], uint16_t nb return 1; } +int __rte_hot +cn20k_sso_hws_profile_switch(void *port, uint8_t profile) +{ + struct cn20k_sso_hws *ws = port; + + ws->gw_wdata &= ~(0xFFUL); + ws->gw_wdata |= (profile + 1); + + return 0; +} + uint16_t __rte_hot cn20k_sso_hws_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks) { diff --git a/drivers/event/cnxk/cn20k_worker.h b/drivers/event/cnxk/cn20k_worker.h index 8dc60a06ec..447f28f0f2 100644 --- a/drivers/event/cnxk/cn20k_worker.h +++ b/drivers/event/cnxk/cn20k_worker.h @@ -145,6 +145,7 @@ uint16_t __rte_hot cn20k_sso_hws_enq_new_burst(void *port, const struct rte_even uint16_t nb_events); uint16_t __rte_hot cn20k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[], uint16_t nb_events); +int __rte_hot cn20k_sso_hws_profile_switch(void *port, uint8_t profile); uint16_t __rte_hot cn20k_sso_hws_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks); uint16_t __rte_hot cn20k_sso_hws_deq_burst(void *port, struct rte_event ev[], uint16_t nb_events, -- 2.25.1