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 95C5845B9E; Tue, 22 Oct 2024 11:18:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42664406B4; Tue, 22 Oct 2024 11:18:06 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F02E6402DA for ; Tue, 22 Oct 2024 11:17:50 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49M8PRKW017624; Tue, 22 Oct 2024 02:17:49 -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=Y /PJnlx4auYjVELuvvHEvR77jQmxOqivdOHzQTUo7jA=; b=gwMjK7GIbMMTMbM0x tMYgN4PGKc7Cgva+DvZAq1OU+CEsER7tDqer4rc++YIV4//hBPpmfTZsmwMMsf11 Iu0Xg3s3OMBcA54/FIyFhCE77u1+c3/pfAn3Gez1Jns8B+nWCxZh1sSrnmeVTpp4 ygKtdh9ZHCYCVzZP5K+5o524zeK4qdYlNqUAWDWlIvzd8Hqy0nWtjvVEBJXAtz/m 2ZI6RajUFvNKSflKX1MbAZpcSqJ55dteQPpfd/Xg6prWHn+SFcNFgwvOSN9wQCFV aDV9665cL+sYJESRxpe6KkqqFmNVv9euSjnnhIgvUGXkkSAw15Hc10QczzjEAzwB VZpIg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42e8hag3k2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Oct 2024 02:17:49 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 22 Oct 2024 02:17:48 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 22 Oct 2024 02:17:48 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id 4371E5E6A42; Tue, 22 Oct 2024 01:47:22 -0700 (PDT) From: To: , , , Pavan Nikhilesh , Shijith Thotton CC: Subject: [PATCH v3 13/22] event/cnxk: add CN20K device stop and close Date: Tue, 22 Oct 2024 14:16:31 +0530 Message-ID: <20241022084641.14497-13-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022084641.14497-1-pbhagavatula@marvell.com> References: <20241021205745.7310-1-pbhagavatula@marvell.com> <20241022084641.14497-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: j68vIUBzrONCVGsvzo5oLyen5viF-jM9 X-Proofpoint-GUID: j68vIUBzrONCVGsvzo5oLyen5viF-jM9 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 event device stop and close callback functions. Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cn20k_eventdev.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/event/cnxk/cn20k_eventdev.c b/drivers/event/cnxk/cn20k_eventdev.c index 90902bce40..47a48d0ff2 100644 --- a/drivers/event/cnxk/cn20k_eventdev.c +++ b/drivers/event/cnxk/cn20k_eventdev.c @@ -388,6 +388,25 @@ cn20k_sso_start(struct rte_eventdev *event_dev) return rc; } +static void +cn20k_sso_stop(struct rte_eventdev *event_dev) +{ + struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev); + uint8_t hws[RTE_EVENT_MAX_PORTS_PER_DEV]; + int i; + + for (i = 0; i < event_dev->data->nb_ports; i++) + hws[i] = i; + roc_sso_hws_gwc_invalidate(&dev->sso, hws, event_dev->data->nb_ports); + cnxk_sso_stop(event_dev, cnxk_sso_hws_reset, cn20k_sso_hws_flush_events); +} + +static int +cn20k_sso_close(struct rte_eventdev *event_dev) +{ + return cnxk_sso_close(event_dev, cn20k_sso_hws_unlink); +} + static struct eventdev_ops cn20k_sso_dev_ops = { .dev_infos_get = cn20k_sso_info_get, .dev_configure = cn20k_sso_dev_configure, @@ -408,6 +427,8 @@ static struct eventdev_ops cn20k_sso_dev_ops = { .timeout_ticks = cnxk_sso_timeout_ticks, .dev_start = cn20k_sso_start, + .dev_stop = cn20k_sso_stop, + .dev_close = cn20k_sso_close, }; static int -- 2.25.1