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 322C3A04FD; Mon, 23 May 2022 10:43:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF8B34014F; Mon, 23 May 2022 10:43:07 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2083.outbound.protection.outlook.com [40.107.237.83]) by mails.dpdk.org (Postfix) with ESMTP id 0653B40041 for ; Mon, 23 May 2022 10:43:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dw6rfmn1Fux+F+3JfO1RCkPE1j1ohC7Lg7utSNQGPPmy+ZhD/8X7zvOq+rTobDPoYUudMlynSWvx2GwsZyC7NvyIyllr0ZkHzyhS1jxSXIqC8Nv9eeXVD8DfPEs+5bfFwkZq0u/ohFwh0afu97gpJ1WVVUBUrNSQAijiy251Eqvfe7fV53NHRvjswwHL4c5efvV039tyaCQzmcUKMEAI7Q2rS0A5FxshTKCnyJ4Koc27Ahxpw+/Ya1kQOBuRN6q79/91e28JQXyqHIDBOYKv3YE+su70Y0FzodFj9zOYwDwfnAljsSL9Re9iDpEEJMSe7e041+l12QGRePMNRH8LwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FGcMZ4Rm/bfU9l5q5dr3Q03Dm0/a8r9PVBFqwNh9mJA=; b=BVDhhr9GtOL65ESBYBsQBE8Qrj3C5VFk6sd4U7H/0Ivno3RA4OAa/wefFn1UIodjE5MlieDUp/OfChgkILTTvqvvV1IDzUDP8iWf5E9uzDZzj9hSUie7dQM2wOiEMhSjgDs5hyor+KgxLsDMM+ztoSGem6PHaIhYh5Sf6qnSgKAJf4ZuP5c3JU9g6T5aimXRCIKgMs0vnRunLZ/yJcW+7I8broFK8epql9/22KO9ycDb0RN+jwrDbeNBegFeAnLii+97MHDJgrOc5oDRil98N9bNSxkc+zxPxZTzCLIyM14qzUtvjfllPBAsWTWi5l0iMMPA0ySKRNjNrL3OB973Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FGcMZ4Rm/bfU9l5q5dr3Q03Dm0/a8r9PVBFqwNh9mJA=; b=lINgJ5wUjnpaP8U7jkF9Bqyf8IepJVG27oQfVprT+zMECxWtnMEZvKCLE3B3hG61qLZXpW8LS8JeAgY026Ml9ziFI7khh50ncgb94EO0HQj2VsGEEg0sHsQNWWNpS1qeMMGpdOW5JWKP8ZwrrVvBB66q8GtyVtC07tMAvIFklik= Received: from BN9PR03CA0153.namprd03.prod.outlook.com (2603:10b6:408:f4::8) by DM5PR02MB3148.namprd02.prod.outlook.com (2603:10b6:4:68::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13; Mon, 23 May 2022 08:43:05 +0000 Received: from BN1NAM02FT004.eop-nam02.prod.protection.outlook.com (2603:10b6:408:f4:cafe::2c) by BN9PR03CA0153.outlook.office365.com (2603:10b6:408:f4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13 via Frontend Transport; Mon, 23 May 2022 08:43:05 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT004.mail.protection.outlook.com (10.13.2.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5273.14 via Frontend Transport; Mon, 23 May 2022 08:43:04 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 23 May 2022 09:43:03 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 23 May 2022 09:43:03 +0100 Envelope-to: reshma.pattan@intel.com, mtahhan@redhat.com, stephen@networkplumber.org, thomas@monjalon.net, dev@dpdk.org, humin29@huawei.com Received: from [10.71.117.73] (port=61828) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nt3eZ-0003UJ-El; Mon, 23 May 2022 09:43:03 +0100 Message-ID: Date: Mon, 23 May 2022 09:43:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] app/procinfo: add devcie private info dump Content-Language: en-US To: , Maryam Tahhan CC: , , , "Min Hu (Connor)" References: <20220219015916.46347-1-humin29@huawei.com> <20220221022412.47258-1-humin29@huawei.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05ae54b2-ec9e-444a-64c8-08da3c9840f5 X-MS-TrafficTypeDiagnostic: DM5PR02MB3148:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rD00QJh7H6aii4BbUI081nH+LAtuqocvwj0AOVjSP1DcpoR9IiK4hxV4wN7Zis0207vqA5G18f0xYgb8jhJ1KTV67o9P7TwPVtpzvn+Uu+rZlMWtw3BlrQOkF67T/mZmx40eg55cUrKZK7IWsfDBAvMNyJrwbCg5KmhiIaU0r+OPegl0AkKeK4u+ukHfeDL8rktc4z6P4vCtDUAql98aFg5mu49N8GuS9LBY3cogy4nPUQ5cSB+cDMmQUkHRVZHcgsOfJWQZ9q9gR5zER0A2LzF7TTp7p3pK8XqEcFJNLNivgwBbJmMkbydtksmZC0Q9JAPD/rMrRReOoAyHaXgddBFzwztsJ41bHui2msZ5YHNN8XdMqIfwWsR+c1qCottxsXIj+MQSnE6u0S/WKqKFn0m6r4bbBQF2jRGDZ5zn2znRgG5ragdvSTYWHbXgOF7Yu2W8bi9B7mSibrjXD2tBBsG/CUTbpx3WXFTloeomV5YI0y2+GdX/UPk61h9D7umyH3hMbBukigV+dCa9+hb76yNn8B3XxVKsf5XK2K5CnrA+5M3mI6ID/GO53JJDlIAL+vD9LRO9Dk2VQb6SxDAkhK1P9yopdlu4XOP3LHa7DLnOnLu7ARinyqSLFozlrJjb/VAP709qDcrX+F8xzKvQq7LjmFa83LnoXdr4JKD4KYKwVDTzpBXBpVh6Fpea1yf6i3/NEvUBwgaYOq+mtZfxW6yjRGuyIpZYS+noGjHNqjs= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(35950700001)(2906002)(5660300002)(47076005)(54906003)(110136005)(336012)(36756003)(83380400001)(44832011)(31686004)(316002)(9786002)(8936002)(40460700003)(82310400005)(356005)(8676002)(86362001)(7636003)(2616005)(70586007)(4326008)(70206006)(26005)(53546011)(31696002)(508600001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2022 08:43:04.6991 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05ae54b2-ec9e-444a-64c8-08da3c9840f5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT004.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3148 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 On 5/21/2022 7:54 AM, Min Hu (Connor) wrote: > CAUTION: This message has originated from an External Source. Please use > proper judgment and caution when opening attachments, clicking links, or > responding to this email. > > > Hi, Ferruh, >     what do you think of this patch? > Hi Connor, Maryam & Reshma are maintainers of the tool, both are cc'ed. > > 在 2022/2/21 10:24, Min Hu (Connor) 写道: >> This patch adds support for dump the device private info from a running >> application. It can help developers locate the problem. >> >> Signed-off-by: Min Hu (Connor) >> --- >> v2: >> * fix way of handling ports. >> --- >>   app/proc-info/main.c | 28 ++++++++++++++++++++++++++++ >>   1 file changed, 28 insertions(+) >> >> diff --git a/app/proc-info/main.c b/app/proc-info/main.c >> index 56070a3317..accb5e716d 100644 >> --- a/app/proc-info/main.c >> +++ b/app/proc-info/main.c >> @@ -84,6 +84,8 @@ static char bdr_str[MAX_STRING_LEN]; >> >>   /**< Enable show port. */ >>   static uint32_t enable_shw_port; >> +/**< Enable show port private info. */ >> +static uint32_t enable_shw_port_priv; >>   /**< Enable show tm. */ >>   static uint32_t enable_shw_tm; >>   /**< Enable show crypto. */ >> @@ -123,6 +125,7 @@ proc_info_usage(const char *prgname) >>               "  --collectd-format: to print statistics to STDOUT in >> expected by collectd format\n" >>               "  --host-id STRING: host id used to identify the system >> process is running on\n" >>               "  --show-port: to display ports information\n" >> +             "  --show-port-private: to display ports private >> information\n" >>               "  --show-tm: to display traffic manager information for >> ports\n" >>               "  --show-crypto: to display crypto information\n" >>               "  --show-ring[=name]: to display ring information\n" >> @@ -232,6 +235,7 @@ proc_info_parse_args(int argc, char **argv) >>               {"xstats-ids", 1, NULL, 1}, >>               {"host-id", 0, NULL, 0}, >>               {"show-port", 0, NULL, 0}, >> +             {"show-port-private", 0, NULL, 0}, >>               {"show-tm", 0, NULL, 0}, >>               {"show-crypto", 0, NULL, 0}, >>               {"show-ring", optional_argument, NULL, 0}, >> @@ -284,6 +288,9 @@ proc_info_parse_args(int argc, char **argv) >>                       else if (!strncmp(long_option[option_index].name, >>                                       "show-port", MAX_LONG_OPT_SZ)) >>                               enable_shw_port = 1; >> +                     else if (!strncmp(long_option[option_index].name, >> +                                     "show-port-private", >> MAX_LONG_OPT_SZ)) >> +                             enable_shw_port_priv = 1; >>                       else if (!strncmp(long_option[option_index].name, >>                                       "show-tm", MAX_LONG_OPT_SZ)) >>                               enable_shw_tm = 1; >> @@ -887,6 +894,25 @@ show_port(void) >>       } >>   } >> >> +static void >> +show_port_private_info(void) >> +{ >> +     int i; >> + >> +     snprintf(bdr_str, MAX_STRING_LEN, " show - Port PMD Private "); >> +     STATS_BDR_STR(10, bdr_str); >> + >> +     RTE_ETH_FOREACH_DEV(i) { >> +             /* Skip if port is not in mask */ >> +             if ((enabled_port_mask & (1ul << i)) == 0) >> +                     continue; >> + >> +             snprintf(bdr_str, MAX_STRING_LEN, " Port %u ", i); >> +             STATS_BDR_STR(5, bdr_str); >> +             rte_eth_dev_priv_dump(i, stdout); >> +     } >> +} >> + >>   static void >>   display_nodecap_info(int is_leaf, struct rte_tm_node_capabilities *cap) >>   { >> @@ -1549,6 +1575,8 @@ main(int argc, char **argv) >>       /* show information for PMD */ >>       if (enable_shw_port) >>               show_port(); >> +     if (enable_shw_port_priv) >> +             show_port_private_info(); >>       if (enable_shw_tm) >>               show_tm(); >>       if (enable_shw_crypto) >>