From patchwork Tue Sep 20 10:51:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116487 X-Patchwork-Delegate: thomas@monjalon.net 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 C12C8A00C3; Tue, 20 Sep 2022 12:53:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F0714281E; Tue, 20 Sep 2022 12:53:32 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id B69B041614 for ; Tue, 20 Sep 2022 12:53:29 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWyxp1fckzpT7Q; Tue, 20 Sep 2022 18:50:38 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:25 +0800 From: Dongdong Liu To: , , , , CC: "Min Hu (Connor)" , Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 1/6] app/procinfo: add version dump Date: Tue, 20 Sep 2022 18:51:42 +0800 Message-ID: <20220920105148.7664-2-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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: "Min Hu (Connor)" This patch add support for dump dpdk version and ethdev firmware version. The command is like: dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-version Signed-off-by: Min Hu (Connor) Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 1bfba5f60d..da67155007 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -39,11 +39,14 @@ #include #include #include +#include /* Maximum long option length for option parsing. */ #define MAX_LONG_OPT_SZ 64 #define MAX_STRING_LEN 256 +#define ETHDEV_FWVERS_LEN 32 + #define STATS_BDR_FMT "========================================" #define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ STATS_BDR_FMT, s, w, STATS_BDR_FMT) @@ -102,6 +105,8 @@ static char *mempool_iter_name; /**< Enable dump regs. */ static uint32_t enable_dump_regs; static char *dump_regs_file_prefix; +/* Enable show version. */ +static uint32_t enable_shw_version; /**< display usage */ static void @@ -130,6 +135,7 @@ proc_info_usage(const char *prgname) " --show-crypto: to display crypto information\n" " --show-ring[=name]: to display ring information\n" " --show-mempool[=name]: to display mempool information\n" + " --show-version: to display DPDK version and ethdev firmware version\n" " --iter-mempool=name: iterate mempool elements to display content\n" " --dump-regs=file-prefix: dump registers to file with the file-prefix\n", prgname); @@ -242,6 +248,7 @@ proc_info_parse_args(int argc, char **argv) {"show-mempool", optional_argument, NULL, 0}, {"iter-mempool", required_argument, NULL, 0}, {"dump-regs", required_argument, NULL, 0}, + {"show-version", 0, NULL, 0}, {NULL, 0, 0, 0} }; @@ -313,7 +320,9 @@ proc_info_parse_args(int argc, char **argv) "dump-regs", MAX_LONG_OPT_SZ)) { enable_dump_regs = 1; dump_regs_file_prefix = optarg; - } + } else if (!strncmp(long_option[option_index].name, + "show-version", MAX_LONG_OPT_SZ)) + enable_shw_version = 1; break; case 1: /* Print xstat single value given by name*/ @@ -1476,6 +1485,32 @@ dump_regs(char *file_prefix) } } +static void +show_version(void) +{ + char fw_version[ETHDEV_FWVERS_LEN]; + uint16_t i; + + snprintf(bdr_str, MAX_STRING_LEN, " show - version "); + STATS_BDR_STR(10, bdr_str); + printf("DPDK version: %s\n", rte_version()); + + RTE_ETH_FOREACH_DEV(i) { + /* Skip if port is not in mask */ + if ((enabled_port_mask & (1ul << i)) == 0) + continue; + + if (!rte_eth_dev_is_valid_port(i)) + continue; + + if (rte_eth_dev_fw_version_get(i, fw_version, + ETHDEV_FWVERS_LEN) == 0) + printf("Ethdev port %u firmware version: %s\n", i, fw_version); + else + printf("Ethdev port %u firmware version: %s\n", i, "not available"); + } +} + int main(int argc, char **argv) { @@ -1589,7 +1624,8 @@ main(int argc, char **argv) iter_mempool(mempool_iter_name); if (enable_dump_regs) dump_regs(dump_regs_file_prefix); - + if (enable_shw_version) + show_version(); RTE_ETH_FOREACH_DEV(i) rte_eth_dev_close(i); From patchwork Tue Sep 20 10:51:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116486 X-Patchwork-Delegate: thomas@monjalon.net 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 C7D3CA00C3; Tue, 20 Sep 2022 12:53:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5D3442684; Tue, 20 Sep 2022 12:53:31 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 44E3241181 for ; Tue, 20 Sep 2022 12:53:29 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWyxq5SXMzpT7X; Tue, 20 Sep 2022 18:50:39 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:27 +0800 From: Dongdong Liu To: , , , , CC: "Min Hu (Connor)" , Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 2/6] app/procinfo: add RSS RETA dump Date: Tue, 20 Sep 2022 18:51:43 +0800 Message-ID: <20220920105148.7664-3-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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: "Min Hu (Connor)" This patch add support for RSS reta dump. The command is like: dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-rss-reta Signed-off-by: Min Hu (Connor) Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index da67155007..a718c201ce 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -46,6 +46,8 @@ #define MAX_STRING_LEN 256 #define ETHDEV_FWVERS_LEN 32 +#define RTE_RETA_CONF_GROUP_NUM 32 +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #define STATS_BDR_FMT "========================================" #define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ @@ -107,6 +109,8 @@ static uint32_t enable_dump_regs; static char *dump_regs_file_prefix; /* Enable show version. */ static uint32_t enable_shw_version; +/* Enable show RSS reta. */ +static uint32_t enable_shw_rss_reta; /**< display usage */ static void @@ -136,6 +140,7 @@ proc_info_usage(const char *prgname) " --show-ring[=name]: to display ring information\n" " --show-mempool[=name]: to display mempool information\n" " --show-version: to display DPDK version and ethdev firmware version\n" + " --show-rss-reta: to display ports redirection table\n" " --iter-mempool=name: iterate mempool elements to display content\n" " --dump-regs=file-prefix: dump registers to file with the file-prefix\n", prgname); @@ -249,6 +254,7 @@ proc_info_parse_args(int argc, char **argv) {"iter-mempool", required_argument, NULL, 0}, {"dump-regs", required_argument, NULL, 0}, {"show-version", 0, NULL, 0}, + {"show-rss-reta", 0, NULL, 0}, {NULL, 0, 0, 0} }; @@ -323,6 +329,9 @@ proc_info_parse_args(int argc, char **argv) } else if (!strncmp(long_option[option_index].name, "show-version", MAX_LONG_OPT_SZ)) enable_shw_version = 1; + else if (!strncmp(long_option[option_index].name, + "show-rss-reta", MAX_LONG_OPT_SZ)) + enable_shw_rss_reta = 1; break; case 1: /* Print xstat single value given by name*/ @@ -1511,6 +1520,53 @@ show_version(void) } } +static void +show_port_rss_reta_info(void) +{ + struct rte_eth_rss_reta_entry64 reta_conf[RTE_RETA_CONF_GROUP_NUM + 1]; + struct rte_eth_dev_info dev_info; + uint16_t i, idx, shift; + uint16_t num; + uint16_t id; + int ret; + + RTE_ETH_FOREACH_DEV(id) { + /* Skip if port is not in mask */ + if ((enabled_port_mask & (1ul << id)) == 0) + continue; + + if (!rte_eth_dev_is_valid_port(id)) + continue; + + snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", id); + STATS_BDR_STR(5, bdr_str); + + ret = rte_eth_dev_info_get(id, &dev_info); + if (ret < 0) { + printf("Error getting device info, ret = %d\n", ret); + return; + } + + num = DIV_ROUND_UP(dev_info.reta_size, RTE_ETH_RETA_GROUP_SIZE); + memset(reta_conf, 0, sizeof(reta_conf)); + for (i = 0; i < num; i++) + reta_conf[i].mask = ~0ULL; + + ret = rte_eth_dev_rss_reta_query(id, reta_conf, dev_info.reta_size); + if (ret < 0) { + printf("Failed to get RSS RETA info, ret = %d\n", ret); + return; + } + + for (i = 0; i < dev_info.reta_size; i++) { + idx = i / RTE_ETH_RETA_GROUP_SIZE; + shift = i % RTE_ETH_RETA_GROUP_SIZE; + printf("RSS RETA configuration: hash index=%u, queue=%u\n", + i, reta_conf[idx].reta[shift]); + } + } +} + int main(int argc, char **argv) { @@ -1626,6 +1682,8 @@ main(int argc, char **argv) dump_regs(dump_regs_file_prefix); if (enable_shw_version) show_version(); + if (enable_shw_rss_reta) + show_port_rss_reta_info(); RTE_ETH_FOREACH_DEV(i) rte_eth_dev_close(i); From patchwork Tue Sep 20 10:51:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116489 X-Patchwork-Delegate: thomas@monjalon.net 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 76834A00C3; Tue, 20 Sep 2022 12:53:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F81542847; Tue, 20 Sep 2022 12:53:35 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 485E24069B for ; Tue, 20 Sep 2022 12:53:31 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MWyvh2P3gzMnMl; Tue, 20 Sep 2022 18:48:48 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:28 +0800 From: Dongdong Liu To: , , , , CC: "Min Hu (Connor)" , Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 3/6] app/procinfo: add module info dump Date: Tue, 20 Sep 2022 18:51:44 +0800 Message-ID: <20220920105148.7664-4-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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: "Min Hu (Connor)" This patch add support for module info dump. The command is like: dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-module-info Signed-off-by: Min Hu (Connor) Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index a718c201ce..bc93af51df 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -48,6 +48,7 @@ #define ETHDEV_FWVERS_LEN 32 #define RTE_RETA_CONF_GROUP_NUM 32 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) +#define EEPROM_DUMP_CHUNKSIZE 1024 #define STATS_BDR_FMT "========================================" #define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ @@ -111,6 +112,8 @@ static char *dump_regs_file_prefix; static uint32_t enable_shw_version; /* Enable show RSS reta. */ static uint32_t enable_shw_rss_reta; +/* Enable show module info. */ +static uint32_t enable_shw_module_info; /**< display usage */ static void @@ -141,6 +144,7 @@ proc_info_usage(const char *prgname) " --show-mempool[=name]: to display mempool information\n" " --show-version: to display DPDK version and ethdev firmware version\n" " --show-rss-reta: to display ports redirection table\n" + " --show-module-info: to display ports module info\n" " --iter-mempool=name: iterate mempool elements to display content\n" " --dump-regs=file-prefix: dump registers to file with the file-prefix\n", prgname); @@ -255,6 +259,7 @@ proc_info_parse_args(int argc, char **argv) {"dump-regs", required_argument, NULL, 0}, {"show-version", 0, NULL, 0}, {"show-rss-reta", 0, NULL, 0}, + {"show-module-info", 0, NULL, 0}, {NULL, 0, 0, 0} }; @@ -332,6 +337,9 @@ proc_info_parse_args(int argc, char **argv) else if (!strncmp(long_option[option_index].name, "show-rss-reta", MAX_LONG_OPT_SZ)) enable_shw_rss_reta = 1; + else if (!strncmp(long_option[option_index].name, + "show-module-info", MAX_LONG_OPT_SZ)) + enable_shw_module_info = 1; break; case 1: /* Print xstat single value given by name*/ @@ -1567,6 +1575,49 @@ show_port_rss_reta_info(void) } } +static void +show_module_eeprom_info(void) +{ + unsigned char bytes_eeprom[EEPROM_DUMP_CHUNKSIZE]; + struct rte_eth_dev_module_info module_info; + struct rte_dev_eeprom_info eeprom_info; + uint16_t i; + int ret; + + RTE_ETH_FOREACH_DEV(i) { + /* Skip if port is not in mask */ + if ((enabled_port_mask & (1ul << i)) == 0) + continue; + + if (!rte_eth_dev_is_valid_port(i)) + continue; + + snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", i); + STATS_BDR_STR(5, bdr_str); + + ret = rte_eth_dev_get_module_info(i, &module_info); + if (ret != 0) { + printf("Module EEPROM information read error %d\n", ret); + return; + } + + eeprom_info.offset = 0; + eeprom_info.length = module_info.eeprom_len; + eeprom_info.data = bytes_eeprom; + + ret = rte_eth_dev_get_module_eeprom(i, &eeprom_info); + if (ret != 0) { + printf("Module EEPROM read error %d\n", ret); + return; + } + + rte_hexdump(stdout, "hexdump", eeprom_info.data, + eeprom_info.length); + printf("Finish -- Port: %u MODULE EEPROM length: %d bytes\n", + i, eeprom_info.length); + } +} + int main(int argc, char **argv) { @@ -1684,6 +1735,8 @@ main(int argc, char **argv) show_version(); if (enable_shw_rss_reta) show_port_rss_reta_info(); + if (enable_shw_module_info) + show_module_eeprom_info(); RTE_ETH_FOREACH_DEV(i) rte_eth_dev_close(i); From patchwork Tue Sep 20 10:51:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116488 X-Patchwork-Delegate: thomas@monjalon.net 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 04262A00C3; Tue, 20 Sep 2022 12:53:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5874D4282D; Tue, 20 Sep 2022 12:53:34 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 1063442829 for ; Tue, 20 Sep 2022 12:53:33 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWywP2PMCzlW1w; Tue, 20 Sep 2022 18:49:25 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:30 +0800 From: Dongdong Liu To: , , , , CC: Jie Hai , Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 4/6] app/proc-info: add dump of Rx/Tx burst mode Date: Tue, 20 Sep 2022 18:51:45 +0800 Message-ID: <20220920105148.7664-5-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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: Jie Hai Add dump of Rx/Tx burst mode in --show-port. Sample output changes: - rx queue - -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \ mempool mb_pool_0 socket 0 + -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \ mempool mb_pool_0 socket 0 burst mode : Vector Neon - tx queue - -- 0 descriptors 1024 thresh 32/928 \ offloads : MBUF_FAST_FREE + -- 0 descriptors 1024 thresh 32/928 \ offloads : MBUF_FAST_FREE burst mode : Scalar Signed-off-by: Jie Hai Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index bc93af51df..9f708421c5 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -838,6 +838,7 @@ show_port(void) for (j = 0; j < dev_info.nb_rx_queues; j++) { struct rte_eth_rxq_info queue_info; + struct rte_eth_burst_mode mode; int count; ret = rte_eth_rx_queue_info_get(i, j, &queue_info); @@ -873,11 +874,18 @@ show_port(void) if (queue_info.conf.offloads != 0) show_offloads(queue_info.conf.offloads, rte_eth_dev_rx_offload_name); + if (rte_eth_rx_burst_mode_get(i, j, &mode) == 0) + printf(" burst mode : %s%s", + mode.info, + mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ? + " (per queue)" : ""); + printf("\n"); } for (j = 0; j < dev_info.nb_tx_queues; j++) { struct rte_eth_txq_info queue_info; + struct rte_eth_burst_mode mode; ret = rte_eth_tx_queue_info_get(i, j, &queue_info); if (ret != 0) @@ -898,6 +906,13 @@ show_port(void) if (queue_info.conf.offloads != 0) show_offloads(queue_info.conf.offloads, rte_eth_dev_tx_offload_name); + + if (rte_eth_tx_burst_mode_get(i, j, &mode) == 0) + printf(" burst mode : %s%s", + mode.info, + mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ? + " (per queue)" : ""); + printf("\n"); } From patchwork Tue Sep 20 10:51:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116490 X-Patchwork-Delegate: thomas@monjalon.net 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 D3E29A00C3; Tue, 20 Sep 2022 12:53:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E2FF42B6E; Tue, 20 Sep 2022 12:53:42 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 8C21242836 for ; Tue, 20 Sep 2022 12:53:39 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MWyy175L5zpT7Q; Tue, 20 Sep 2022 18:50:49 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:37 +0800 From: Dongdong Liu To: , , , , CC: Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 5/6] app/procinfo: fix some wrong doxygen syntax Date: Tue, 20 Sep 2022 18:51:46 +0800 Message-ID: <20220920105148.7664-6-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 This code is to do cleanup for the wrong doxygen syntax comments. Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 9f708421c5..d8d8c843d1 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -54,33 +54,33 @@ #define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ STATS_BDR_FMT, s, w, STATS_BDR_FMT) -/**< mask of enabled ports */ +/* mask of enabled ports */ static unsigned long enabled_port_mask; -/**< Enable stats. */ +/* Enable stats. */ static uint32_t enable_stats; -/**< Enable xstats. */ +/* Enable xstats. */ static uint32_t enable_xstats; -/**< Enable collectd format*/ +/* Enable collectd format */ static uint32_t enable_collectd_format; -/**< FD to send collectd format messages to STDOUT*/ +/* FD to send collectd format messages to STDOUT */ static int stdout_fd; -/**< Host id process is running on */ +/* Host id process is running on */ static char host_id[MAX_LONG_OPT_SZ]; #ifdef RTE_LIB_METRICS -/**< Enable metrics. */ +/* Enable metrics. */ static uint32_t enable_metrics; #endif -/**< Enable stats reset. */ +/* Enable stats reset. */ static uint32_t reset_stats; -/**< Enable xstats reset. */ +/* Enable xstats reset. */ static uint32_t reset_xstats; -/**< Enable memory info. */ +/* Enable memory info. */ static uint32_t mem_info; -/**< Enable displaying xstat name. */ +/* Enable displaying xstat name. */ static uint32_t enable_xstats_name; static char *xstats_name; -/**< Enable xstats by ids. */ +/* Enable xstats by ids. */ #define MAX_NB_XSTATS_IDS 1024 static uint32_t nb_xstats_ids; static uint64_t xstats_ids[MAX_NB_XSTATS_IDS]; @@ -88,24 +88,24 @@ static uint64_t xstats_ids[MAX_NB_XSTATS_IDS]; /* show border */ static char bdr_str[MAX_STRING_LEN]; -/**< Enable show port. */ +/* Enable show port. */ static uint32_t enable_shw_port; /* Enable show port private info. */ static uint32_t enable_shw_port_priv; -/**< Enable show tm. */ +/* Enable show tm. */ static uint32_t enable_shw_tm; -/**< Enable show crypto. */ +/* Enable show crypto. */ static uint32_t enable_shw_crypto; -/**< Enable show ring. */ +/* Enable show ring. */ static uint32_t enable_shw_ring; static char *ring_name; -/**< Enable show mempool. */ +/* Enable show mempool. */ static uint32_t enable_shw_mempool; static char *mempool_name; -/**< Enable iter mempool. */ +/* Enable iter mempool. */ static uint32_t enable_iter_mempool; static char *mempool_iter_name; -/**< Enable dump regs. */ +/* Enable dump regs. */ static uint32_t enable_dump_regs; static char *dump_regs_file_prefix; /* Enable show version. */ @@ -115,7 +115,7 @@ static uint32_t enable_shw_rss_reta; /* Enable show module info. */ static uint32_t enable_shw_module_info; -/**< display usage */ +/* display usage */ static void proc_info_usage(const char *prgname) { From patchwork Tue Sep 20 10:51:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 116491 X-Patchwork-Delegate: thomas@monjalon.net 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 79E47A00C3; Tue, 20 Sep 2022 12:54:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C9B742B73; Tue, 20 Sep 2022 12:53:49 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 1E76442836 for ; Tue, 20 Sep 2022 12:53:45 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MWyvt35YfzMnMq; Tue, 20 Sep 2022 18:48:58 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 18:53:38 +0800 From: Dongdong Liu To: , , , , CC: Dongdong Liu , Maryam Tahhan Subject: [PATCH v2 6/6] doc: add some extended features in procinfo guide Date: Tue, 20 Sep 2022 18:51:47 +0800 Message-ID: <20220920105148.7664-7-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220920105148.7664-1-liudongdong3@huawei.com> References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 Add the below extended features in procinfo guide. --show-port-private --show-version --show-rss-reta --show-module-info Signed-off-by: Dongdong Liu --- doc/guides/tools/proc_info.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst index 9772d97ef0..417fb9f308 100644 --- a/doc/guides/tools/proc_info.rst +++ b/doc/guides/tools/proc_info.rst @@ -69,6 +69,18 @@ mempool. For invalid or no mempool name, whole list is dump. The iter-mempool parameter iterates and displays mempool elements specified by name. For invalid or no mempool name no elements are displayed. +**--show-port-private** +The show-port-private parameter displays ports private information. + +**--show-version** +The show-version parameter displays DPDK version and ethdev firmware version. + +**--show-rss-reta** +The show-rss-reta parameter displays ports rss redirection table. + +**--show-module-info** +The show-module-info parameter displays ports module eeprom information. + Limitations -----------