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 2C2CE41E9D; Wed, 15 Mar 2023 11:12:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB9F2427F2; Wed, 15 Mar 2023 11:12:57 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2077.outbound.protection.outlook.com [40.107.92.77]) by mails.dpdk.org (Postfix) with ESMTP id E820F427F2 for ; Wed, 15 Mar 2023 11:12:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DaPGDbQot0avs3UvAgsYINt0XBrSztfdflTmFbT+2ONhXkD9dRT9g3cXZj8saLr7MLtYu228Ai96Bic8Xop/SIMYy6uWzlcqBTQ18fi2NRPDM8x4wOxoill3u87UOMJm7AJAohnSpCzBUwJ0PdgErzIDfhVHdclQKnMDYRnwYBnYIdcpvbHccrTJl5N+SLYNWJgNpp7X1Wt2XEaQALJFZ8WvkGhMeZT+/2FDD+rxaO7gzC3vbJAmrQNQrHh76PuEFZJCZfaUuWEQ0GGh2MA4wCdRaTfIN1DueSZNuUMIWjzGbpVp88E1DM95Xd6yOuoVs3hGt8534/q0r9m8S2Gg+Q== 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=280W5FWDAkwjZEuln4Nlmr68J7ZCC7zpFFUFJPqeSUY=; b=g3PYTt6RirC4BjQDkndkmoxbOL+7xHFoSci9Rddl7D1M6c5p3bm9lGIcyuwbqHpREW2z7cNx1cu49hmjDQBmDFLfZ6m6ZFkujmDL9gwmUANzsUnodLr4yjMJ0CfPBbfBJbTfwmj6KCP2vQoPK13Hp6pz9CXzVHOsABJJ+yJwiOPRY/rZgNZpfnYF0SBJ5kUMVFQ8gNJMfpZTZqGJJLc/fH2516fYUrBVhrM6vDR6aXtR2ZI2z4ag+7xmSVsaY0c08fgcZv4FP2Q4p4e5J+ONYolQpcDx4RoAofWu6CYrRip9ISorGVHlU5SC3FTpbdCB1L3IPlUcQlgi8QKjtxJIdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=280W5FWDAkwjZEuln4Nlmr68J7ZCC7zpFFUFJPqeSUY=; b=a5y1YOjLBLt0oIW63SMZNYddE8OirdD5EFZpKvFIBtSyZngMyb8a4oIWaaB1S1pTUNzoXcMdH2XObJioZHS06lTqiP5JVmcglDvt9Vxmkby7d5ILq5htonywR+fh75GZnuCcKyX0VSV+hHtBgrYCsfj1M/YylKu0l7hvGaAaAWI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH3PR12MB7596.namprd12.prod.outlook.com (2603:10b6:610:14b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26; Wed, 15 Mar 2023 10:12:54 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.026; Wed, 15 Mar 2023 10:12:54 +0000 Message-ID: <33a601b7-8e44-6dc7-923a-27d9a74c6993@amd.com> Date: Wed, 15 Mar 2023 10:12:48 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] app/testpmd: dump private info in 'show port info' Content-Language: en-US To: Chengwen Feng , thomas@monjalon.net, Aman Singh , Yuying Zhang Cc: dev@dpdk.org References: <20230314115035.33356-1-fengchengwen@huawei.com> <20230315023328.35980-1-fengchengwen@huawei.com> From: Ferruh Yigit In-Reply-To: <20230315023328.35980-1-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0113.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::29) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB7596:EE_ X-MS-Office365-Filtering-Correlation-Id: 1add9a57-81cb-4702-719f-08db253dd74a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: blrq6CWWpo7/ZSG+uKyIWEFu6GHcq8Rb5bUh4m4FvnHmAwCTEHYY7y2CS5QuXWxNP/Or6hEu61KTY2hcnamIU+0jegEfhwsq2hqTCEU9pLyKscTuLN5NMrj6+ru2HV/GlexLbKpcz94hzGYd8EP9X5qJvDkwtPq3Lxw4/+q9R/reSshqLXGy0jKl1fz6d+HoCu6Vh9wSMn3Fh63Ugk+yJIq7jGiCcJkCIOcjsY2nNeM9Ni7i8igxjCjbzAyrNLsEv1vGhf/9IST78FUtSO6MnSeky1B1hfWQe25BfwJqNEeNhuRu3BlR2qbgGQUZ9nBrvbbvOug75bOZTJqdiHN8AK0LCT4bgWFwQgypPrv+Ox5CBUCroWUEYYnuFMfJoiEgy+SmwsBFEFBXkPDa7otOQMBpiDcceetv2GISRG8WA+ARw7DFtJZcrzL1d+k85Ceh+khPNaBBhD6Ylu1LxFqfoLcMBr7srivLICWcbKikJJBj6qc2g7u6TMFW6FKeFfgNdBnM7WkBdv+gPGrKb65E4TODlYCM/BQrBYPAM2rK50c24NtwcsFTX8PVThLonKwDgb8bf1I/B0J9kaHM83UqCjRxKnyVDHIdwKqxisAihC5WoAjgfJ8OmKXLguBTkC+Va2JO3lglITkkmp3GJbjehLlDPNphAoCko0XtxtVphrs5HuZUvYYGYL6de/yWU9NuBy8OzHa0UcDBmrAwJ8dx95zAAIpvPItfTFKjaso3gzE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(396003)(136003)(39860400002)(366004)(376002)(346002)(451199018)(8936002)(66476007)(8676002)(110136005)(66556008)(4326008)(66946007)(316002)(41300700001)(31686004)(478600001)(5660300002)(4744005)(44832011)(186003)(2906002)(6486002)(2616005)(6666004)(53546011)(26005)(6512007)(6506007)(36756003)(86362001)(31696002)(38100700002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MENCOWVnOWNadHBXc3Mvam8vdDVrc2tHLzAycnp2bkpEMEYwbDFzcVRZV1Ar?= =?utf-8?B?OVRoeFZuVFBoNUVocjFFaCszRlUvUm5HQXlZRjZRblkxenUwZEpCR0Mvc3JW?= =?utf-8?B?Y29uVElUNStCT3M1RGUyWGtPWWlmSlNIN05idmxSVEQzL3BEQXhvRytieURh?= =?utf-8?B?ZFlIem9zTHZHdEREell5UjYxVWJvSXo2WjI0SDFTeU04Z01EYjM5aUlaeFZs?= =?utf-8?B?RmpBK2JMdzVkeHBHaUs2SGZ6b3c1MUFkUXFnZG8vdjdkQ0IwS1RMa2pYZnE3?= =?utf-8?B?O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AvMnFhRXdkTmNlQnlm?= =?utf-8?Q?elIzJ0lJ4c3aFsskmZ3E3Mn7I?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1add9a57-81cb-4702-719f-08db253dd74a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2023 10:12:54.0790 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CIZoD288UQTl/E7qfU2KPOsz2VnUeX+yr/D8lzDtmrkZ823PT8OrLTxDBLOGc5DF X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7596 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 3/15/2023 2:33 AM, Chengwen Feng wrote: > This patch adds dump private info in 'show port info [port_id]' cmd. > > Signed-off-by: Chengwen Feng > --- > app/test-pmd/config.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 018536f177..ab5199f223 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -938,6 +938,11 @@ port_infos_display(portid_t port_id) > printf("unknown\n"); > break; > } > + printf("Device private info:\n"); Not all drivers support device private info, above should print only when it is supported. > + ret = rte_eth_dev_priv_dump(port_id, stdout); > + if (ret < 0) > + fprintf(stderr, " Failed to dump private info with error (%d): %s\n", > + ret, strerror(-ret)); Similarly, if driver doesn't support '.eth_dev_priv_dump' it shouldn't print the above error log.