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 8B1A5A0C41; Tue, 19 Oct 2021 17:21:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 772D741216; Tue, 19 Oct 2021 17:21:00 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2084.outbound.protection.outlook.com [40.107.101.84]) by mails.dpdk.org (Postfix) with ESMTP id D5DCC41171 for ; Tue, 19 Oct 2021 17:20:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdgLHvYOQNLXWySDpgIfg5yNhR14WyPl7E4Fo+6ulFDDn8zpwJkPSgn2pZP0UMQ+d7+PeNgrANeEXZTibFb1WABRlnZSWuLWLRDIZEVcHECJc6yCJIgnmy15HG5vmjDkuGpcbBPgv9XE2Fhe8BLS+YTZiwN7UfLt5hCail3kMPlrxyp7CgsOV2M3XFY5jfEvYkho1aA7AFKzhBEmRCHLsxtkrOa/150SiMt4hATUi1C3bKr2Z0NHgWxsk3Gp4ujzO/N9FJtqmh+yVBxyQnDDDWMBTbdAELKme15lyfkYhqne3BUyoivIm0I7aT8CFbnTuSTIgjr5LY75IbPl20ru3A== 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=4G5E8Qcas4ftWkubqoswyHcXIL6Vrja6Y96xDP7hMr0=; b=RUKXYBF58zaellHBsc2nacXNAfPSvCHhDtCSx1Snn9VrOHQQE55ixUuNLqS+RK/ffJ75aRRaf/man9L1MhE+CvNtqgne+XNDaiRAxEIVVeM11hLOJe0lwMgvjfvwc/vabLxoAiZU311pcueIA6TdKML2J11djNUhgKGuD0T5DsXnJPzoOPXjP2cb0HNo1kzRtaALnWOb4F+Iq1Y2bC9gagy6QRwN3PLa2wFt7QXb3Z1OkwpepF1PI6yDk7hxSt+3qjta6tD1wCtM9YCaK95xULinhEJ6+xa6QrvmTLDAvzTmkYFlnvOsuSj+bSuPNQmRe1Q4w4/6LRNQHzjimE3OUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=4G5E8Qcas4ftWkubqoswyHcXIL6Vrja6Y96xDP7hMr0=; b=XX9uQMCULNEpV70MqV/y/+7h4wcXLIUh1MWrAUa7r70C7+/rH30QbERrbO6SkqUHkdgjtYRYPWqOUD+Ef1MAhEJYo1tWO4KK3dJry0HG4Bo6fvxMfFQYy1MMzJLA5+R6kWr0D+1DoTFxgG6PEVQcLdVtRABzAmJxv8wdW2FEiMQAwQoJkQ8mjHtAHHQve6NGg55PGxib+lxf+TMkBuS2zYOli0t50fvNfOykK3+QcdCcwsf6AGhwqozIeR29aGNYE+HojZz7/5/BJnpCeK5ilNjzOYPDj8Zv6+DAkdLH9LEWwsvzhVJtG3ZFUyTKhapaVXQ9Jd+omf6e4w87iMqTsQ== Received: from DM5PR07CA0034.namprd07.prod.outlook.com (2603:10b6:3:16::20) by BY5PR12MB5512.namprd12.prod.outlook.com (2603:10b6:a03:1df::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 15:20:58 +0000 Received: from DM6NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:3:16:cafe::b6) by DM5PR07CA0034.outlook.office365.com (2603:10b6:3:16::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15 via Frontend Transport; Tue, 19 Oct 2021 15:20:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT051.mail.protection.outlook.com (10.13.172.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Tue, 19 Oct 2021 15:20:57 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 19 Oct 2021 15:20:49 +0000 From: Xueming Li To: , Zhang Yuying CC: , Jerin Jacob , Ferruh Yigit , Andrew Rybchenko , Viacheslav Ovsiienko , Thomas Monjalon , Lior Margalit , "Ananyev Konstantin" , Ajit Khaparde , Xiaoyun Li Date: Tue, 19 Oct 2021 23:20:20 +0800 Message-ID: <20211019152024.2277527-3-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019152024.2277527-1-xuemingl@nvidia.com> References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211019152024.2277527-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 005fc307-c7e7-4d71-536d-08d993140d5b X-MS-TrafficTypeDiagnostic: BY5PR12MB5512: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:238; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZnQ7N7s4tRD+hbbcNQ0USr39CBUZgTIBk89BIXG2cFB3qnWwcvdEqZCNUYhel9fszzLS7+dIi1xDufd/mv2F6EkfJMm/XuD5AjzotUJtoi8iUsTQuOCJbsjiZyBI7z+14S7YSutbXks/Ml3mbyu7VgzGFL/yK9N/OWInGV/NcxiZTCjOAEOdT5xE2k+17NWvZGfN7iNIpkdo7POLGHGvlOMa17tAs7asAUn4U8aVZkDO4YrF7sYcIUKoy6PduS9eQKBj2qOEGGW+dHXJ1zRsdtdm9EXHdtaf6UZWR/TJfOyNIvUSGfAtRgvIg3m8zU3tdDdXBQoCtUuqWCsHvZLJatJRD3+xZPMeasL8OdTCwzmhsYNIsLGMWDESCMEwbPDSFzq4p9riy7mjYgwkWhgDLPA3tRnSy/LOLuWBwVwNcldIT1AJ38uG7JVNCjsaQuu4jyAD4bOG75XlX0d9CKxpwn61j+kEYeeStltQQW9o5Gv7EoP4H1avYMGo++Q5qjMKDtSLq1uiuTrq1GniQfGmvhXhu6NiB6zG9jeKEUKOyAQm931i4sGGkbZybN9Es9ptvn6G/ydpPb+IPyyVNgSjSnCOM7lLVsc2lm5f5n3pSK8TMyQwHVqhIOnm61fRz8kwFnISFHrv8TGW4LCuzFbOjCeGmmNsWTyrR3X2jsqDWCcIEmNJeExnueQGRAbKrjocanj5Kg50TfwUMtNXez0ReA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(8676002)(26005)(36906005)(508600001)(1076003)(7696005)(316002)(110136005)(7636003)(36860700001)(47076005)(356005)(2906002)(70586007)(426003)(16526019)(6666004)(55016002)(336012)(186003)(2616005)(36756003)(6286002)(82310400003)(8936002)(5660300002)(70206006)(4326008)(54906003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 15:20:57.6577 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 005fc307-c7e7-4d71-536d-08d993140d5b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB5512 Subject: [dpdk-dev] [PATCH v10 2/6] app/testpmd: dump device capability and Rx domain 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" Dump device capability and Rx domain ID if shared Rx queue is supported by device. Signed-off-by: Xueming Li Acked-by: Andrew Rybchenko --- app/test-pmd/config.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 9c66329e96e..2c1b06c544d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -582,6 +582,29 @@ device_infos_display(const char *identifier) rte_devargs_reset(&da); } +static void +print_dev_capabilities(uint64_t capabilities) +{ + uint64_t single_capa; + int begin; + int end; + int bit; + + if (capabilities == 0) + return; + + begin = __builtin_ctzll(capabilities); + end = sizeof(capabilities) * CHAR_BIT - __builtin_clzll(capabilities); + + single_capa = 1ULL << begin; + for (bit = begin; bit < end; bit++) { + if (capabilities & single_capa) + printf(" %s", + rte_eth_dev_capability_name(single_capa)); + single_capa <<= 1; + } +} + void port_infos_display(portid_t port_id) { @@ -733,6 +756,9 @@ port_infos_display(portid_t port_id) printf("Max segment number per MTU/TSO: %hu\n", dev_info.tx_desc_lim.nb_mtu_seg_max); + printf("Device capabilities: 0x%"PRIx64"(", dev_info.dev_capa); + print_dev_capabilities(dev_info.dev_capa); + printf(" )\n"); /* Show switch info only if valid switch domain and port id is set */ if (dev_info.switch_info.domain_id != RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID) { @@ -743,6 +769,9 @@ port_infos_display(portid_t port_id) dev_info.switch_info.domain_id); printf("Switch Port Id: %u\n", dev_info.switch_info.port_id); + if ((dev_info.dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE) != 0) + printf("Switch Rx domain: %u\n", + dev_info.switch_info.rx_domain); } } -- 2.33.0