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 D5C7345A74; Tue, 1 Oct 2024 08:02:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8024E40DF6; Tue, 1 Oct 2024 08:01:53 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 984FD40E01 for ; Tue, 1 Oct 2024 08:01:51 +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 4914GiqU004021 for ; Mon, 30 Sep 2024 23:01:50 -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=T EhdCzfIUD/Jz6eAqr2jnhjIpqYfEh8LlrlEOeb4XUo=; b=IIoW2e4XQkL9mgj+x Y8tDVhVn3YtmuwPzjIyU/M6vBRCTwGtp78vAHYO/Svi6F6pAp9i1Bgr+gNDFkJZg Uu6WjD5gY69g7CApvr1pkE8wZEAY+XWQT+rge5rSgOmuVaD6cmIn9omuzZdiLejZ AnbFEGO9/HfaBszR/irRuKsscfO2UKROLLs3NsHHS8RHm6Q6egZ5d32cDTJpWjBy kouhNZWh9PVTSPthRZB29on4vAQvZWiLslddJVoNCm2riqri70hXV2ChErK86kVe goMCP9+EorBX4dTC5mGdeoTH1M46rlAeMQatG3ybAYu1KD2Dxe32wTa42Qkc66ZU Tnl9A== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 41xf5m2etm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Sep 2024 23:01:50 -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; Mon, 30 Sep 2024 23:01:49 -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; Mon, 30 Sep 2024 23:01:49 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id D51A73F7066; Mon, 30 Sep 2024 23:01:45 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , Srujana Challa Subject: [PATCH v2 15/17] net/cnxk: add PMD API to retrieve the model string Date: Tue, 1 Oct 2024 11:30:53 +0530 Message-ID: <20241001060055.3747591-15-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241001060055.3747591-1-ndabilpuram@marvell.com> References: <20241001060055.3747591-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: rJTU7uzDot4l7tZd7gUT-XaTqGgX_dA8 X-Proofpoint-GUID: rJTU7uzDot4l7tZd7gUT-XaTqGgX_dA8 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: Srujana Challa This patch adds PMD API to retrieve the model string. This API allows applications to get the HW model string directly. Signed-off-by: Srujana Challa --- drivers/net/cnxk/cnxk_ethdev.c | 7 +++++++ drivers/net/cnxk/rte_pmd_cnxk.h | 9 +++++++++ drivers/net/cnxk/version.map | 1 + 3 files changed, 17 insertions(+) diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index c7723800ef..23dc2a26cc 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -4,11 +4,18 @@ #include #include +#include #define CNXK_NIX_CQ_INL_CLAMP_MAX (64UL * 1024UL) #define NIX_TM_DFLT_RR_WT 71 +const char * +rte_pmd_cnxk_model_str_get(void) +{ + return roc_model->name; +} + static inline uint64_t nix_get_rx_offload_capa(struct cnxk_eth_dev *dev) { diff --git a/drivers/net/cnxk/rte_pmd_cnxk.h b/drivers/net/cnxk/rte_pmd_cnxk.h index e207f43c80..a20b4f277d 100644 --- a/drivers/net/cnxk/rte_pmd_cnxk.h +++ b/drivers/net/cnxk/rte_pmd_cnxk.h @@ -680,4 +680,13 @@ int rte_pmd_cnxk_cpt_q_stats_get(uint16_t portid, enum rte_pmd_cnxk_cpt_q_stats_ */ __rte_experimental void rte_pmd_cnxk_hw_inline_inb_cfg_set(uint16_t portid, struct rte_pmd_cnxk_ipsec_inb_cfg *cfg); + +/** + * Retrieves model name on which it is running as a string. + * + * @return + * Returns model string, ex."cn10ka_a1" + */ +__rte_experimental +const char *rte_pmd_cnxk_model_str_get(void); #endif /* _PMD_CNXK_H_ */ diff --git a/drivers/net/cnxk/version.map b/drivers/net/cnxk/version.map index dd41e7bd56..099c518ecf 100644 --- a/drivers/net/cnxk/version.map +++ b/drivers/net/cnxk/version.map @@ -16,6 +16,7 @@ EXPERIMENTAL { rte_pmd_cnxk_inl_dev_qptr_get; rte_pmd_cnxk_inl_dev_submit; rte_pmd_cnxk_inl_ipsec_res; + rte_pmd_cnxk_model_str_get; rte_pmd_cnxk_sa_flush; }; -- 2.34.1