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 DA790A0C4B; Thu, 21 Oct 2021 07:09:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D89584116A; Thu, 21 Oct 2021 07:09:22 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2080.outbound.protection.outlook.com [40.107.237.80]) by mails.dpdk.org (Postfix) with ESMTP id D2A6240142 for ; Thu, 21 Oct 2021 07:09:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTak96b6cQjp5N7RsNvUKwQKAmzg3bjZpiI6cq4bpxA6ksqVdh6LfZhNgnju8F7StueQVqYAtQkHk/SrKLaIXyW/Y+ZRpQ5PpqBZ6XlVSPHIdjt+EviMwtgOIsHv7bxZ0tdOSoP9ABgvTAR/V5dJIke9vwSJX4rHxA9qeWuD4BNx2wZ578+kS17wgTq1AhMjcc5pH186cS68NmTKOv7OrOlECywBcOe0goidLDyu0En6+FTzL9TxlPc7RjEaQZktVlQiyFVYanzt10pqpsDWw4ohGKBd2kjA35XdoOqqdwcSkOzHj94nJEEyzhiB35IxVi8PfOJBEOTsSueD+YfUpA== 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=CwnHpJdaaTxuam6nt6TxTKzUQMJd0SqsFlzqQqVLYBc=; b=J+2mEyo4OsZodDiJTSCghv6IhmuZOmgZT8WnifqwRWJYjlKmox7/nYxUt6I6tJH20soX7sjPt/tyYwDdjSv7B55PH6MA3kqt4JzQWZx1XHuf3YWFR5FP4edVQaslwcCgj9lwN60dBP+o/QRWWXfpiYpPe5RtTvAGn7V0eyQWWVjE0uzTy5pcu04mviGK6PzMmM1h521KCQJUlrYzaKTpaE0TkByHE9SEw+FKYRFHN3pW7hzpkw/XR8XkxwQk3ee52Nn9xxXeYfdjj42MWXt51Y9rsJT7nUU0OwmOxV7IcBgNEWZLybhGbxc/saglb5H+N58I9cJJa3i61WPa584Ytw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=monjalon.net 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=CwnHpJdaaTxuam6nt6TxTKzUQMJd0SqsFlzqQqVLYBc=; b=NtD6DBzbOi7z7oMlQJgwz+0P5GHMtlIkz1NJTg0qTSdi0mqNzYjrttYI1LDK5z/E2c9JoSycT6MLMZo+FxV3en03V5nDmVXx/CIFaNHxJRFr1HRM0yjFQ/+9BS/20hY/+1BLY7JxQmYPglgFPKZh7tFNvcLbln2zyDkk19W7Npq0c0bF8FPJ6QnFFTnBa6PYCDw0NJmZhSOJHtrR2qWxrDJBr4jSMvKMnVCLkflIHP8eSyqRK7w+brOI3kPb7qRlAGbNHZkV5Tb6iZV4YeWGOxUcmtZlo50HFaU7Wl7EYMVkJRMQzwPsq5d9cCmeqJb2kSx+tBG0MWeMonrBlTJDqg== Received: from DM5PR13CA0039.namprd13.prod.outlook.com (2603:10b6:3:7b::25) by MW2PR12MB4668.namprd12.prod.outlook.com (2603:10b6:302:e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Thu, 21 Oct 2021 05:09:18 +0000 Received: from DM6NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:3:7b:cafe::82) by DM5PR13CA0039.outlook.office365.com (2603:10b6:3:7b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.9 via Frontend Transport; Thu, 21 Oct 2021 05:09:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; 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 DM6NAM11FT003.mail.protection.outlook.com (10.13.173.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Thu, 21 Oct 2021 05:09:17 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 21 Oct 2021 05:09:09 +0000 From: Xueming Li To: , Zhang Yuying , Li Xiaoyun CC: , Jerin Jacob , Ferruh Yigit , Andrew Rybchenko , Viacheslav Ovsiienko , Thomas Monjalon , Lior Margalit , "Ananyev Konstantin" , Ajit Khaparde Date: Thu, 21 Oct 2021 13:08:28 +0800 Message-ID: <20211021050832.2599691-4-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211021050832.2599691-1-xuemingl@nvidia.com> References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211021050832.2599691-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] 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: 2babe507-ae25-44cf-cf89-08d99450ef40 X-MS-TrafficTypeDiagnostic: MW2PR12MB4668: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True 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: 4cmUvWtmp63H91lSYcoSMMfzZrd1xJ/sjUaRIiY6u4zT2LQuxke4CZRejY8iejLuTaeJCIoklYgzz8iFifudCqPx26Ja95FfCppwNwQr40flnEvJ7Q1U9E7u9HmYd07+de3dvLQs4Ku+EpjfHyHKYxKxtg0/nUe6Bg7bSO6PUjT7uzkN4BrrkYWe7eBlSAYV3ezCOdq3hzq51BEzQvBQuyT0mvHS/uajLOGgGiDitpK35ZUyiqaUQQUQ8kOIbtO44L2zMJ0XBEswPI9Ntx38OsbLUl0QVFG1EDI/wnqKO+QMr+ENPpY1faeY2ZUQ1U588do/gZiVDFDKSqke/jNVfzBqLYlNnVTqT+tzhsAUHwULcmSuZwZsEOv7HYmndRlJWzr5hKPZoqBXCvETw/MJjS90nEJ08AOuJ1bV4/VGuZc8nL9JmTEvzyGuwg1BF7tTeZSom8sWeKcp4XFDSdAvLV9QFjQI6wskAwzOBgkdl6n/3P5ovgxC2qNA+h058VdDbhUaxAS9zOmQG8nKUOv0uolDWH8Yq7ZcIV0RXMfHS9XWb7A65spbg6KOdMWXsFWN1LtBuoGvGjTSt2Nx7/0jZZ+am3hak3oERrL4biWPGR+PnWokfZF//ehPYssHq7W+NsX7t9UsooSRkp+xbfZLaNmhCNNTfoW8IddwLmwEIkVtpPlzMBHWIV3lL4uyXsNblpOR+5QZU8RTcj7qgLqG7A== 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)(336012)(2616005)(6666004)(1076003)(5660300002)(47076005)(70586007)(6286002)(186003)(36860700001)(54906003)(82310400003)(8936002)(7696005)(110136005)(508600001)(55016002)(7636003)(70206006)(16526019)(316002)(4326008)(2906002)(426003)(356005)(8676002)(36756003)(26005)(36906005)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2021 05:09:17.6675 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2babe507-ae25-44cf-cf89-08d99450ef40 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: DM6NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB4668 Subject: [dpdk-dev] [PATCH v12 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 Acked-by: Xiaoyun Li --- 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 23aa334cda0..db36ca41b94 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -644,6 +644,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) { @@ -795,6 +818,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) { @@ -805,6 +831,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