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 D1F6A45B9E; Tue, 22 Oct 2024 11:19:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D940740B8C; Tue, 22 Oct 2024 11:18:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3BC1E402DA for ; Tue, 22 Oct 2024 11:17:56 +0200 (CEST) Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49M6SSwB020805; Tue, 22 Oct 2024 02:17:55 -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=I n64zaaiAlsYHEkQssfOM9sgvaK5RXHMQql+1ZuWSYQ=; b=MXnWfllntf/EZCp05 qZoac6A48xmu1aUPNESthlJL6LSiE74v1onLaT57VQ9JJv+CRLXIkMcHtOF2bTpt mpE0/pGecKucGbFu98ey6SzoNHOJE9+ZtqZvQUzosZSAQkTtrnc0CRreM/dpqdQc /zzLGVMZ2+zJp1zfNy0KXK/Rokvit1cm2go78ASU8+hBajpeF56xwXBnHTMgjoxf 1Yv1TInGS3nRr0rJzbtvVCgiCV6N3IuqHOM3x74IJeOL4UtirPgqX1ajQhnbuazW vF845HSalCAGUooSmPcteWlLgZQEIDeZTdcKz5jwd6qxWi0JmDEgA5/b+h3w1Wv9 4QC8A== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 42e6tf0bky-13 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Oct 2024 02:17:55 -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; Tue, 22 Oct 2024 02:17:48 -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; Tue, 22 Oct 2024 02:17:47 -0700 Received: from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com [10.28.164.106]) by maili.marvell.com (Postfix) with ESMTP id CBF435E6A44; Tue, 22 Oct 2024 01:47:24 -0700 (PDT) From: To: , , , Pavan Nikhilesh , Shijith Thotton CC: Subject: [PATCH v3 14/22] event/cnxk: add CN20K xstats, selftest and dump Date: Tue, 22 Oct 2024 14:16:32 +0530 Message-ID: <20241022084641.14497-14-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: W-OPV7tEa6IeSyc8ZwpYOnDJC9Kp_qPG X-Proofpoint-GUID: W-OPV7tEa6IeSyc8ZwpYOnDJC9Kp_qPG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_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 selftest to verify SSO, xstats to get queue specific stats and add function to dump internal state of SSO. Signed-off-by: Pavan Nikhilesh --- app/test/test_eventdev.c | 7 +++++++ drivers/event/cnxk/cn20k_eventdev.c | 12 ++++++++++++ drivers/event/cnxk/cnxk_eventdev_selftest.c | 8 ++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index a9258d2abc..f4da07c596 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -1521,6 +1521,12 @@ test_eventdev_selftest_cn10k(void) return test_eventdev_selftest_impl("event_cn10k", ""); } +static int +test_eventdev_selftest_cn20k(void) +{ + return test_eventdev_selftest_impl("event_cn20k", ""); +} + #endif /* !RTE_EXEC_ENV_WINDOWS */ REGISTER_FAST_TEST(eventdev_common_autotest, true, true, test_eventdev_common); @@ -1532,5 +1538,6 @@ REGISTER_DRIVER_TEST(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2); REGISTER_DRIVER_TEST(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2); REGISTER_DRIVER_TEST(eventdev_selftest_cn9k, test_eventdev_selftest_cn9k); REGISTER_DRIVER_TEST(eventdev_selftest_cn10k, test_eventdev_selftest_cn10k); +REGISTER_DRIVER_TEST(eventdev_selftest_cn20k, test_eventdev_selftest_cn20k); #endif /* !RTE_EXEC_ENV_WINDOWS */ diff --git a/drivers/event/cnxk/cn20k_eventdev.c b/drivers/event/cnxk/cn20k_eventdev.c index 47a48d0ff2..8037c0229a 100644 --- a/drivers/event/cnxk/cn20k_eventdev.c +++ b/drivers/event/cnxk/cn20k_eventdev.c @@ -407,6 +407,12 @@ cn20k_sso_close(struct rte_eventdev *event_dev) return cnxk_sso_close(event_dev, cn20k_sso_hws_unlink); } +static int +cn20k_sso_selftest(void) +{ + return cnxk_sso_selftest(RTE_STR(event_cn20k)); +} + static struct eventdev_ops cn20k_sso_dev_ops = { .dev_infos_get = cn20k_sso_info_get, .dev_configure = cn20k_sso_dev_configure, @@ -426,9 +432,15 @@ static struct eventdev_ops cn20k_sso_dev_ops = { .port_unlink_profile = cn20k_sso_port_unlink_profile, .timeout_ticks = cnxk_sso_timeout_ticks, + .xstats_get = cnxk_sso_xstats_get, + .xstats_reset = cnxk_sso_xstats_reset, + .xstats_get_names = cnxk_sso_xstats_get_names, + + .dump = cnxk_sso_dump, .dev_start = cn20k_sso_start, .dev_stop = cn20k_sso_stop, .dev_close = cn20k_sso_close, + .dev_selftest = cn20k_sso_selftest, }; static int diff --git a/drivers/event/cnxk/cnxk_eventdev_selftest.c b/drivers/event/cnxk/cnxk_eventdev_selftest.c index 7a3262bcff..8f3d0982e9 100644 --- a/drivers/event/cnxk/cnxk_eventdev_selftest.c +++ b/drivers/event/cnxk/cnxk_eventdev_selftest.c @@ -1566,16 +1566,16 @@ cnxk_sso_selftest(const char *dev_name) return rc; } - if (roc_model_runtime_is_cn10k()) { - printf("Verifying CN10K workslot getwork mode none\n"); + if (roc_model_runtime_is_cn10k() || roc_model_runtime_is_cn20k()) { + printf("Verifying %s workslot getwork mode none\n", dev_name); dev->gw_mode = CNXK_GW_MODE_NONE; if (cnxk_sso_testsuite_run(dev_name)) return rc; - printf("Verifying CN10K workslot getwork mode prefetch\n"); + printf("Verifying %s workslot getwork mode prefetch\n", dev_name); dev->gw_mode = CNXK_GW_MODE_PREF; if (cnxk_sso_testsuite_run(dev_name)) return rc; - printf("Verifying CN10K workslot getwork mode smart prefetch\n"); + printf("Verifying %s workslot getwork mode smart prefetch\n", dev_name); dev->gw_mode = CNXK_GW_MODE_PREF_WFE; if (cnxk_sso_testsuite_run(dev_name)) return rc; -- 2.25.1