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 1008DA0558; Mon, 5 Sep 2022 15:35:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11ED042BC6; Mon, 5 Sep 2022 15:34:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0E82E4281B for ; Mon, 5 Sep 2022 15:34:03 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 285DJX3n031629 for ; Mon, 5 Sep 2022 06:34:03 -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-transfer-encoding : content-type; s=pfpt0220; bh=vyytxyde77ASNQQnrmvcdeJf2hMrK+BH+U4n1T8fOpc=; b=I5GIq09X/wU5JMjfXIARDUHIsdJ/GxJxULrCe+RtPDr4UGtGwae8sv+zkpVseDeHEcmB /C6uEgaNBKqciOvfBLNExDAD8wt9loxuYS97TF4FYenGyKFzPuHPa1it/neaS9NBGfEt vT4yIaa+TOEW7f6+U2r8qOmLXvNSeIz3v3aApM6aSzRRv/KzRiwaL/kp8gI4r94OU/mC 5g83nAmoUCPoj8FABI0ClN9Xo9LGxefE4wOUh2tcOfkewLnA9AqjBmxJf1uz8aV5TeD2 XLUL1hyUf83dC3TrI5QThgV2lmtbBfOqjPgoM6KiTb/n1X2wnFqe1EyASvgJLHfxf1yf pg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jc6epngma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 05 Sep 2022 06:34:03 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 5 Sep 2022 06:34:01 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 5 Sep 2022 06:34:01 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 5F8B95E6870; Mon, 5 Sep 2022 06:33:59 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Rakesh Kudurumalla Subject: [PATCH v2 31/31] net/cnxk: dumps device private information Date: Mon, 5 Sep 2022 19:02:28 +0530 Message-ID: <20220905133228.818616-31-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905133228.818616-1-ndabilpuram@marvell.com> References: <20220809184908.24030-1-ndabilpuram@marvell.com> <20220905133228.818616-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: ufHD21oSu5xeMtKKh8Zg5DZj2NkI_1-r X-Proofpoint-GUID: ufHD21oSu5xeMtKKh8Zg5DZj2NkI_1-r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-05_09,2022-09-05_02,2022-06-22_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: Rakesh Kudurumalla Add support for ethdev private data dump callback for debugging purposes. Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cnxk_ethdev.c | 1 + drivers/net/cnxk/cnxk_ethdev.h | 1 + drivers/net/cnxk/cnxk_ethdev_ops.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 89f8cc107d..48d6bedb89 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -1682,6 +1682,7 @@ struct eth_dev_ops cnxk_eth_dev_ops = { .set_queue_rate_limit = cnxk_nix_tm_set_queue_rate_limit, .tm_ops_get = cnxk_nix_tm_ops_get, .mtr_ops_get = cnxk_nix_mtr_ops_get, + .eth_dev_priv_dump = cnxk_nix_eth_dev_priv_dump, }; static int diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index bed0e0eada..c09e9bff8e 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -585,6 +585,7 @@ int cnxk_nix_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf); int cnxk_nix_rss_hash_conf_get(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf); +int cnxk_nix_eth_dev_priv_dump(struct rte_eth_dev *eth_dev, FILE *file); /* Link */ void cnxk_nix_toggle_flag_link_cfg(struct cnxk_eth_dev *dev, bool set); diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c index 64beabdd12..0a8b36342a 100644 --- a/drivers/net/cnxk/cnxk_ethdev_ops.c +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c @@ -931,6 +931,35 @@ cnxk_nix_reta_query(struct rte_eth_dev *eth_dev, return rc; } +int +cnxk_nix_eth_dev_priv_dump(struct rte_eth_dev *eth_dev, FILE *file) +{ + struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev); + struct roc_nix *roc_nix = &dev->nix; + int i; + + roc_nix_dump(roc_nix, file); + + for (i = 0; i < eth_dev->data->nb_rx_queues; i++) + roc_nix_rq_dump(&dev->rqs[i], file); + + for (i = 0; i < eth_dev->data->nb_rx_queues; i++) + roc_nix_cq_dump(&dev->cqs[i], file); + + for (i = 0; i < eth_dev->data->nb_tx_queues; i++) + roc_nix_sq_dump(&dev->sqs[i], file); + + roc_nix_queues_ctx_dump(roc_nix, file); + + roc_nix_tm_dump(roc_nix, file); + + roc_nix_inl_dev_dump(NULL, file); + + roc_nix_inl_outb_cpt_lfs_dump(roc_nix, file); + + return 0; +} + int cnxk_nix_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) -- 2.25.1