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 1690DA0C45; Wed, 20 Oct 2021 09:54:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97470411BB; Wed, 20 Oct 2021 09:54:30 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2073.outbound.protection.outlook.com [40.107.244.73]) by mails.dpdk.org (Postfix) with ESMTP id EBB0740687 for ; Wed, 20 Oct 2021 09:54:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NeQYs1cO0Weddq9M8XehDs5/k1aP5Mn19GJgriVxHb+MxSexFM2OLtC415a96Sq4Z+DrbvLTWdTmcJGz1VRko9vA4b1TXNKDeDnQJDrNDf1AT8HsIxim7KMl1Jo1FyMQsPrqv7ZvATIznNJ0OOse+T9FWkVCVHQ7mbWA0civhVWhOgw+8lk0wP3nDbrQvPQPCf6BDkFslJ1H5Ev08opVPCyzHBL+gy6SKO0olKpx1qDTWkEUUidqdWU1kIBL29v+uXeJ10ma/Scr6IR74DRh/6eaXAKiaIpqAjIMSdkTcuieiqzuOt8vaHGvL29zP/gP9Z4My1icfzX0fi5/xRoG6w== 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=Ai43h/M53PAQ2KaBEu11YPPcYMuAHVYGnCJriZ1Q5QEqSwy+TV3fbygVFJLFsDRLtEJensl6hg1kpiqwS5SUjoRgku/iUs3zfvJd6Q3zS2Lst6K5Qa0mEkSm/dQ54bsNc31ij/4C0YkGQHzamUn25kiEFETHKTT+EwI4FkE7JJhb0XfSh53buGZyZo/4p5RV+ZYI64ghonFsVWwSp+2eNMLgcO2d4mr0mTHDzPJDHgCE+aMJRdJke5j8LNOcrvaWk3Z+I7QQx9d2sQqEncTJc4MaoZFE86j/+2LrADJ2hYAviqn48eFIRIsP4bHfV2vQTa/aDLMl3tRy8Wz1NLNKHg== 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=Q7nO/IbG+YqsYDAGtUr6UcjfDk7dTv9kUmgQpD5M7b3muF/r/pj9vG5kuY2+dCNyNyMwoHcaKsimFkU6iZ01iRjsNgn5QO3SrigHuQnpyzxu8D1cWskfv1NxrMiyL4Dd09+1/XOB/0vx02/T1lvxOii3xlb3OpOIAViVayMyh+EDERsNZ55y3iDLXJpA8GcuwV01lLQ8tiQ7bfI1de9ZxATnH9QJAx1970xATrSt3DjJrJFTc866YTkHYkJkvb4qQiK/RzfyGb87Un/je582Z5ZCByzJPiPQPORmiK8WRzOe0G/WfLf0fow/GMbMVLIvAUMcbkaY+UDwyAYQliqOcw== Received: from DM5PR21CA0051.namprd21.prod.outlook.com (2603:10b6:3:129::13) by BYAPR12MB4774.namprd12.prod.outlook.com (2603:10b6:a03:10b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Wed, 20 Oct 2021 07:54:19 +0000 Received: from DM6NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:3:129:cafe::13) by DM5PR21CA0051.outlook.office365.com (2603:10b6:3:129::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.1 via Frontend Transport; Wed, 20 Oct 2021 07:54:19 +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 DM6NAM11FT039.mail.protection.outlook.com (10.13.172.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Wed, 20 Oct 2021 07:54:18 +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; Wed, 20 Oct 2021 07:54:08 +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: Wed, 20 Oct 2021 15:53:15 +0800 Message-ID: <20211020075319.2397551-4-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211020075319.2397551-1-xuemingl@nvidia.com> References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211020075319.2397551-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: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3c4ae49-4b7a-418c-c59d-08d9939ed223 X-MS-TrafficTypeDiagnostic: BYAPR12MB4774: 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: 3QRWwflGrj8G7yE/O2UIwhp0b7B5nvOieHjFCYtBe48m8JyIriu2UB1rvvum9JGiDYBjSv+H5JEJMNMYsY3UUt6Vq5Um8XEmry7iAHjqlkf+WLUQEbcZB6cG9hZ71eSUJChckLz+LI2jccGCCn97HCHKIJTWULYTUVoBk5nhfNnPR3Yzdd9dIAQl4vJyu6IVO+5Mmpuwlmylx/pHjEYy/eWzzR6v0vLZpoZEDC5DwFcXOInGPEU6w29iiQI7Mgjtt0CxIUi1mcJQHOsFLYDEQTsE/RxTtz2ULXBBFKsmJJLMjNAjQS3KC2mN8tH6/LnNRGVHjmnfoJNur7PU01AevtiqLhn/+T4VO6mkZyKKHCqGp8a0aNv7vmUBZb4IRYtZ9SsmXKsXHvFSK8ib9UPOwHdfoMkGHX3uudvijELL32PqaTeeJewx2aWJGyxWCvTznUE+WiIqOw6pernyZUcetvGpNhlX9lbgOREzQBBeZxrk7Z68ESG6/clq2Y9X/hz42J7xP3t4noC6b3jgqxA+Oc0QM2owLoaGfoG044ZBwaopDrEabF+qSVQVY6LwNWsm0IsqZmEtSbRsULAuPqdikRm0XpEnZD9ANNhmgYGafUyX8NgoZ1810ktpJxkwBgZU82ahEU6r4dMKSlcG7aiIELzmzSoehgkq1BdIhmjicLLLcZltE0P1ZL/mA+IOYFjKTuCELLMOWsez64CoWmZLjQ== 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)(46966006)(36840700001)(26005)(356005)(426003)(336012)(70206006)(36860700001)(54906003)(70586007)(16526019)(186003)(8936002)(7636003)(5660300002)(86362001)(2906002)(316002)(82310400003)(47076005)(6666004)(7696005)(55016002)(110136005)(8676002)(2616005)(1076003)(6286002)(36756003)(508600001)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2021 07:54:18.6752 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3c4ae49-4b7a-418c-c59d-08d9939ed223 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: DM6NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB4774 Subject: [dpdk-dev] [PATCH v11 3/7] 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