From patchwork Thu Sep 30 17:00:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 100139 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1DE3A0C43; Thu, 30 Sep 2021 19:02:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAFB441121; Thu, 30 Sep 2021 19:02:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2F97B410FF for ; Thu, 30 Sep 2021 19:01:58 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18UF7q9s018525; Thu, 30 Sep 2021 10:01:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=JDn3HmcmLHMxeb5BAm7YjRaE/j64WnzLHPANDvB9N2A=; b=Bo5Bj4a9NHjmGPLP8yQ5Zc0XwkZIYhgjWl++AbhCmZ+6KrDNzEjuHNRzIAOO4Uov3DmG oAwggwCIosYE2Q3Vn0vln8LiVAq+kdRhkVKiZbTT32BCjA4DpxI9hOXhkNnT+pRJ18sb HRBJaADOapNhuwvB3/A3PeNA7fhf5QbgT4bIUrjrOUBRSMLbl9UyQxVnqgiv4eVBCnvp pOFUVzXhIST+Z1dLi+FGHl31Y5sa99TtbZVOW2kF9QfWAYbxKOsMJs3XUEmWqN/uH6oT 4ft5EKvOj+TEAfAPH5xigf85/Zsnp3mSghLOKOlX/fN9Xh3d/ciKHe0V+ggNyTSP3trX zQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3bd3g3b9g4-9 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 10:01:55 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 30 Sep 2021 10:01:27 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 30 Sep 2021 10:01:27 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 1442D3F7067; Thu, 30 Sep 2021 10:01:24 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao , Ray Kinsella CC: Date: Thu, 30 Sep 2021 22:30:47 +0530 Message-ID: <20210930170113.29030-3-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20210930170113.29030-1-ndabilpuram@marvell.com> References: <20210902021505.17607-1-ndabilpuram@marvell.com> <20210930170113.29030-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 6-rICUhqDqWM9YqO_uct0NQOttF4CotC X-Proofpoint-ORIG-GUID: 6-rICUhqDqWM9YqO_uct0NQOttF4CotC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-30_06,2021-09-30_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 02/28] common/cnxk: support CPT parse header dump 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 Sender: "dev" Add helper API to dump CPT parse header. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_cpt.h | 2 ++ drivers/common/cnxk/roc_cpt_debug.c | 31 +++++++++++++++++++++++++++++++ drivers/common/cnxk/version.map | 1 + 3 files changed, 34 insertions(+) diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h index 9e63073..c80a8e0 100644 --- a/drivers/common/cnxk/roc_cpt.h +++ b/drivers/common/cnxk/roc_cpt.h @@ -155,4 +155,6 @@ void __roc_api roc_cpt_iq_enable(struct roc_cpt_lf *lf); int __roc_api roc_cpt_lmtline_init(struct roc_cpt *roc_cpt, struct roc_cpt_lmtline *lmtline, int lf_id); +void __roc_api roc_cpt_parse_hdr_dump(const struct cpt_parse_hdr_s *cpth); + #endif /* _ROC_CPT_H_ */ diff --git a/drivers/common/cnxk/roc_cpt_debug.c b/drivers/common/cnxk/roc_cpt_debug.c index 9a9dcba..a6c9004 100644 --- a/drivers/common/cnxk/roc_cpt_debug.c +++ b/drivers/common/cnxk/roc_cpt_debug.c @@ -5,6 +5,37 @@ #include "roc_api.h" #include "roc_priv.h" +void +roc_cpt_parse_hdr_dump(const struct cpt_parse_hdr_s *cpth) +{ + plt_print("CPT_PARSE \t0x%p:", cpth); + + /* W0 */ + plt_print("W0: cookie \t0x%x\t\tmatch_id \t0x%04x\t\terr_sum \t%u \t", + cpth->w0.cookie, cpth->w0.match_id, cpth->w0.err_sum); + plt_print("W0: reas_sts \t0x%x\t\tet_owr \t%u\t\tpkt_fmt \t%u \t", + cpth->w0.reas_sts, cpth->w0.et_owr, cpth->w0.pkt_fmt); + plt_print("W0: pad_len \t%u\t\tnum_frags \t%u\t\tpkt_out \t%u \t", + cpth->w0.pad_len, cpth->w0.num_frags, cpth->w0.pkt_out); + + /* W1 */ + plt_print("W1: wqe_ptr \t0x%016lx\t", cpth->wqe_ptr); + + /* W2 */ + plt_print("W2: frag_age \t0x%x\t\torig_pf_func \t0x%04x", + cpth->w2.frag_age, cpth->w2.orig_pf_func); + plt_print("W2: il3_off \t0x%x\t\tfi_pad \t0x%x\t\tfi_offset \t0x%x \t", + cpth->w2.il3_off, cpth->w2.fi_pad, cpth->w2.fi_offset); + + /* W3 */ + plt_print("W3: hw_ccode \t0x%x\t\tuc_ccode \t0x%x\t\tspi \t0x%08x", + cpth->w3.hw_ccode, cpth->w3.uc_ccode, cpth->w3.spi); + + /* W4 */ + plt_print("W4: esn \t%" PRIx64 " \t OR frag1_wqe_ptr \t0x%" PRIx64, + cpth->esn, cpth->frag1_wqe_ptr); +} + static int cpt_af_reg_read(struct roc_cpt *roc_cpt, uint64_t reg, uint64_t *val) { diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index c132871..1f9fe36 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -66,6 +66,7 @@ INTERNAL { roc_cpt_lf_fini; roc_cpt_lfs_print; roc_cpt_lmtline_init; + roc_cpt_parse_hdr_dump; roc_cpt_rxc_time_cfg; roc_error_msg_get; roc_hash_sha1_gen;