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 7B144A0C4C; Sat, 28 Aug 2021 15:28:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20B2140150; Sat, 28 Aug 2021 15:28:54 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by mails.dpdk.org (Postfix) with ESMTP id 4AD9C40143 for ; Sat, 28 Aug 2021 15:28:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W8rXuSIbIxLMrMnz2Rke1xqXoDbdOza8jZZ0BRAEmeCPrC8a9ANdTS4kaah8AVbooRzhI+njgQ7tN9Suc17enGHZDLg+ryKpjlB6BCaN0Nt0UlclZKrWN27diOKUIJhdu9+mAOFxJvXM3Jm3WaYXKyxWNtK3LI+UrE9Fok3tmtWNMUZC+amulY5AbVYLzamRgtsK/S9kcy8uW4+pwZRwALL6WVoF1ok/kRcljm2t4qG3v16+QY4UoPPparnFvBKPPmgEWpKefnP0y+NCPsZSUnt9fK6rPGgoiZOLynJ2ZFfhEBcHa9gWW58PK9tgt5vh2hUNze+hE7HlgGvLCyJb8w== 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-SenderADCheck; bh=bT1BqM4pCy/f5vE5pWB8vvL0vYMup5jo9SsiYjRxQM8=; b=Hd1yWUwvcUArddwYnO+3k1CUdTGNS84aW+sNzCds8Xmc8B/7BISEqRszewWBYRhCu5i69wwYifIo5rxg5CU5aT5E+Wek65iC++zhdwBEsAfIvPvKoGV9DfG4Fmz1ofy/qolfTjX2FXPHUE0+kFM5xvq+0QXOVBHbEVzoDncOiwExMB4aPUv+86bfCOdKTzAxlKebAm7UUSsqynI8z87xoaOFjeFSkcQexs3AU7gWmSA3BYQ4ffuimr0VZczTPQ3765/PH769Db7q1BezUoVbGCvP+W5HKtjcsLYEflKBBxt0g561Nd2UfzpVkn6XKeCj6iUX35brETW86EqAF6vj7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bT1BqM4pCy/f5vE5pWB8vvL0vYMup5jo9SsiYjRxQM8=; b=dF7nIc52Mx8JuB974nmyUx05NOzvHkKqKqYBYEa1g0x0RS6yNENFeSVHFWRx3bUZWQFW5vg1GmiZfiBKLonQPNYStbjKS5r2edmlynhP/HBZ8wIkuyVk9BOR08kRNQ/e2k0oL6SKZ3+sih6OUa2vBtdSqFGgD4wskYqO9Sne1Q+2vMtLe4TPRfUElc2e/Noy3up49rBLUZYXPZMRA9aJdvriUIpkEe3uw8nPfIdEf5JkDs0kGf/wA//lY/OROnUAJiBm9Lq1MWDj9rVVVYxhX3ehQh4DFaPlGTFlt4Fntcf3v5WAChai5jXdZk4N+cS6dX7E16ugT9hlVZciNjYKtw== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39a::17) by DM4PR12MB5181.namprd12.prod.outlook.com (2603:10b6:5:394::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sat, 28 Aug 2021 13:28:49 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::20f5:dbdd:64b1:617b]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::20f5:dbdd:64b1:617b%9]) with mapi id 15.20.4415.023; Sat, 28 Aug 2021 13:28:49 +0000 From: "Xueming(Steven) Li" To: Viacheslav Galaktionov CC: Andrew Rybchenko , Xiaoyun Li , "dev@dpdk.org" , Andy Moreton Thread-Topic: [PATCH] app/testpmd: add command to print representor info Thread-Index: AQHXmw5bEKh4eP3aT0OBqUUZwLCQHauHAN3ggAASrQCAAdYqwA== Date: Sat, 28 Aug 2021 13:28:49 +0000 Message-ID: References: <20210827063935.1834143-1-andrew.rybchenko@oktetlabs.ru> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 677392c3-617f-4131-7b76-08d96a27c52d x-ms-traffictypediagnostic: DM4PR12MB5181: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wx+nz31nuARpCRTimHTlqrrVRr/v1SunnKTZqnl+uCmEEtKQg1PCg3CvqZhaRWMlxJPdzorBV5NYLakYfBozMzBvOKguRcX5IqF6WQUw6ANmefIQ9hGpWPaHpsQanyz+nRN5kqj0VrcSdXBXW/Nzqm5IzmN6YzVNaZXENpVA7zYkcsGz68yYgfx3wHsnePjDjg1JUsBgCrizkRbYU0PoggM938bqf+GTKdDV+CJenLZr1JUIRQ3rhI/duTYsSg68V3HL4Ki8q+K+gCiaqhnJ5ohi7ePQRt9L8BhHBXUlOW0m+sw/oobiRd1sJMZdscf+MZBJ4arczhDNthL4h7zKn56k9bKw3kuZIfOZ/K4YGpIRU0o5U9WTV0xEFiFjyw/6f0kiZv2bDV8LvPKc3V+4MBU0uu2uA1wlloD2CD0e4OOy1jtr70RfzC8BgTl4WMRsVvVEcpYWazbbDqW1LJiIbXt/t2UJxBX42mV6t8RCv7syr4BDyL3SDgnBqFgufMTyLy1BB4JRKEFMHYFf373t7S+XsyFgJZ0EapKAEW3K9ZHoJCwqw3G9lNs3UyQ4UyHiKnMqYlCFTJlUXGZSprLEO0F6JDB5MgwHF4bM11zDeXg7zjJl258C/vkmZJfevffIkOZtkhX589XucmLlSVybHxcHJfLllcp9RL5pP1U3fvdCZISKQNmbMVYyqi3sdUt9g/wgfPWqMdQFNEImOsw8rQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(346002)(39860400002)(136003)(396003)(7696005)(6506007)(478600001)(66476007)(53546011)(26005)(38070700005)(186003)(52536014)(316002)(33656002)(71200400001)(8676002)(76116006)(2906002)(66446008)(38100700002)(86362001)(66556008)(6916009)(64756008)(55016002)(9686003)(5660300002)(122000001)(66946007)(4326008)(83380400001)(8936002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Zllbb7kMF205McYtel34LluwlZ3pChuNcyCZvHfcpS1MVqCGTc5Kq0t2EHZi?= =?us-ascii?Q?xqdo7dsdJywHJsIgVeJAvHD6SK3qpEYFLKacRGqqyF53eusz2VIvs06yH6sI?= =?us-ascii?Q?aDdfYYLKO4SY4+/E7g37QALu80LVIyZ2/mWDpSXf3oTXUuXpX5dc6Fy45ejS?= =?us-ascii?Q?0zShHXeQ7caSM1ZxUFK5DP28YSrJLdpQ9hJoqiB57qW0kpO7g7H73mFDs3gH?= =?us-ascii?Q?MpnMGDx64gnlWSWo7UpHRNc4mP3hvpMS5cs9s4/rQlwrFreryJ0/b4y7uLZM?= =?us-ascii?Q?WSyLZ/02NoK0xix+XWv286PU9LmM9VOxMx7pD4HAWWCb+cRYrTr8q6UN9P6E?= =?us-ascii?Q?l96yU09htgVJzqDE3/HAhukD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ascii?Q?vGZ6yo1UCXuvLMDV1f84FRG5scIaydJaj1qSkRolQ3izf6/BEw/afKGbFSff?= =?us-ascii?Q?7dnKCjj0fg4Y3qEBKKpD6Rpn?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 677392c3-617f-4131-7b76-08d96a27c52d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2021 13:28:49.2712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EAFiQ3Yk02pfDvcFLiC4/W/wm6UKgq33wwdCvbn9ibuLt+mYC0krjNxGulU4Ksb8rQHCopvue164xk+gnZGD0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5181 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add command to print representor info 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" > -----Original Message----- > From: Viacheslav Galaktionov > Sent: Friday, August 27, 2021 5:21 PM > To: Xueming(Steven) Li > Cc: Andrew Rybchenko ; Xiaoyun Li ; dev@dpdk.org; Andy Moreton > > Subject: Re: [PATCH] app/testpmd: add command to print representor info >=20 > On 2021-08-27 11:20, Xueming(Steven) Li wrote: > > Thanks for getting this feature more complete! > > > >> -----Original Message----- > >> From: Andrew Rybchenko > >> Sent: Friday, August 27, 2021 2:40 PM > >> To: Xiaoyun Li > >> Cc: dev@dpdk.org; Xueming(Steven) Li ; > >> Viacheslav Galaktionov ; Andy > >> Moreton > >> Subject: [PATCH] app/testpmd: add command to print representor info > >> > >> From: Viacheslav Galaktionov > >> > >> Make it simpler to debug configurations and code related to the > >> representor info API. > >> > >> Signed-off-by: Viacheslav Galaktionov > >> > >> Signed-off-by: Andrew Rybchenko > >> Reviewed-by: Andy Moreton > >> --- > >> app/test-pmd/cmdline.c | 117 > >> +++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 117 insertions(+) > >> > >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > >> 82253bc751..49e6e63471 100644 > >> --- a/app/test-pmd/cmdline.c > >> +++ b/app/test-pmd/cmdline.c > >> @@ -236,6 +236,10 @@ static void cmd_help_long_parsed(void > >> *parsed_result, > >> " Show port supported ptypes" > >> " for a specific port\n\n" > >> > >> + "show port (port_id) representors\n" > >> + " Show supported representors" > >> + " for a specific port\n\n" > > > > Confusing name, code below shows representor info, not probed > > representor devices. > > How about "show port (port_id) representor info"? >=20 > That's a good point, thank you! >=20 > [snip] >=20 > >> +static void > >> +cmd_representor_info_parsed(void *parsed_result, > >> + __rte_unused struct cmdline *cl, > >> + __rte_unused void *data) > >> +{ > >> + struct cmd_representor_info_result *res =3D parsed_result; > >> + struct rte_eth_representor_info *info; > >> + uint32_t i; > >> + int ret; > >> + int num; > >> + > >> + if (!rte_eth_dev_is_valid_port(res->cmd_pid)) { > > > > Seems port "all" not supported, is there a check? >=20 > What kind of check do you mean? > I suppose support for "all" can be added. In such a case, testpmd can go = over all available ports that aren't representors and print > their representor info. > Does this sound good to you? Sorry, "all" will not pass the check, please ignore my comment. Dump a single port is good enough. >=20 > [snip] >=20 > >> + printf("Port controller: %hu\n", info->controller); > >> + printf("Port PF: %hu\n", info->pf); > >> + printf("Ranges: %u\n", info->nb_ranges); > >> + for (i =3D 0; i < info->nb_ranges; i++) { > >> + printf("%u:\n", i); > > > > Normally there will be certain amount of ranges here, how about output > > as a table? >=20 > I'm not sure what the layout of this table should be, could you provide a= n example? Range entry fields is dump in vertical here, how about dump range entry as = a row? No need to align columns. >=20 > [snip]