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 67E47A0C53; Wed, 3 Nov 2021 15:01:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E67142740; Wed, 3 Nov 2021 15:00:47 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2085.outbound.protection.outlook.com [40.107.96.85]) by mails.dpdk.org (Postfix) with ESMTP id 13F1342738 for ; Wed, 3 Nov 2021 15:00:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cYgoBZDUgJVs++pzBxx9ussQbZj14UbUZsUt9YW129bvOzKktoTUhWWeipuPFKCKLg6sryOo8qNph0FQ2TbCGR2SHTO/kGKwQMpyyZgTYJmbzobQKpawmQ0w2WUHYQtqmIZTQfMxiogVYvVemAzLqBy10WEv6bFkxG2LIczVtFN+OWeZ7sPzGw0GIBuS+g25k1Xso7wehEFzzAkNzrzCmVRLcWoq24nSJ1wTyzhCmDfVUGhDOfYglMcwLZd5L3sA2YBjKW5sll13Kub1F3K3CozYNYrD6bq1xW0zYiD5kWJu82J++PI7dqi5Zbbuggk86WdzimSPBT1lhXKcl86vxA== 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=KWMl+euQBRVv5ofLOHuGCue2bLL9w4GZq1LV5Czb5t4=; b=HSnL4e34zUescIrDq7v3FSsO6Wi2edwaj9O+z6hjEAh+m1q4BpFXAKwfSs+xnof5w4+GYL20Y3ivK9O0ah/TQkyijMIm03nvS0zIAdckkT+7cMnMy47imSASYiJ132NqC5on0pKCjGt/fwk6+Ybqorl6saUEhGdE1NozbE6lY2q+2DeaJwnmp73Gp3MrihJdCnddgc0lsNE+vxxqRnszexk2hsq61P+Q4Pd3qCmWUKBG9K6awZ3U7B1UNJvN/s4sBaUZZBnxXgjdMfbOSwpBon+pgKXRHS1+3Q1w/A1A3GFR7pLuUdp4VN5ke7v2l+dE50YOVYxGAgoTxUKmKhFr+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=dpdk.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KWMl+euQBRVv5ofLOHuGCue2bLL9w4GZq1LV5Czb5t4=; b=RBJ/hdRVdyzAeqrUV7YWdAk6OFxiaQ9wHAw99M5YF1HQCptxkqwmvYORVnJj/FejA76heLHSEgjkFtt/hFJWzGZp0+JBWJAjiVcLoIgfbwRf/J2Eza2gaVlvfqodn+JAxJnCIpHF2q1dh/FQlw8DzKb7igMGBxZ6wCMkscUoIAg= Received: from SA9PR13CA0004.namprd13.prod.outlook.com (2603:10b6:806:21::9) by SJ0PR02MB7438.namprd02.prod.outlook.com (2603:10b6:a03:294::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 14:00:43 +0000 Received: from SN1NAM02FT0008.eop-nam02.prod.protection.outlook.com (2603:10b6:806:21:cafe::5c) by SA9PR13CA0004.outlook.office365.com (2603:10b6:806:21::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.4 via Frontend Transport; Wed, 3 Nov 2021 14:00:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0008.mail.protection.outlook.com (10.97.5.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Wed, 3 Nov 2021 14:00:43 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 3 Nov 2021 07:00:42 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 3 Nov 2021 07:00:42 -0700 Envelope-to: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, andrew.rybchenko@oktetlabs.ru Received: from [10.170.66.108] (port=38886 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1miGoj-0003SS-Sa; Wed, 03 Nov 2021 07:00:42 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Wed, 3 Nov 2021 19:27:48 +0530 Message-ID: <20211103135754.17411-5-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211103135754.17411-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211103135754.17411-1-vsrivast@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd95a57d-0a7d-46bb-f057-08d99ed253f5 X-MS-TrafficTypeDiagnostic: SJ0PR02MB7438: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wKUrVAL6Or75xXkB5XOUc4yeYKvpf5vusPCxxKGvGjGTPGOtJyqToa4n/za90fMCoWvliW/JqTyEl02uB5dhAEWSyqi2g2MHKaCcJpBTNrFTwYnstcFZHvZIuREPSl0jvgnsstunJlwsyGpKMXGKc+owklx96ivpx5msZuNitzZut5+iQE8kKIsYZHQN8zJN1bTpGr2/D39lyUwihzabkQdDlFvHf438tmfNae8CWJzV/6YDDp7nLcJ0K+27vZKF4sO2AE0AtNLScGNmpcfieBBHe8GRAp+7WNzzc5FZ24vLED3anRYbQTZn5trpfRiXLqeAY/7r6wIZcq1aNJE+TMfHNNPKKsF28JLOPdbuumMyoH5nHFqV5NFBlAHHTCnKquLw49u4U/UDRjmLCtZuabyXJCx2Kz/Aia4eL6wmKt+SAxLmV/oLh2ONQCwXmHh6m/4NNSNy20ZNf/ZdSrkuXR7G0gBcowk1JTpsDcwP5rlHnqd56CIZaztOiTLqS3m12eH+bilyNyaIzSFA/0L5aJtNkF1yS58MNpnlZB6AEs9dcbMLyPcGvxyUe5o6rd8U6PavHx0yuOxb4uBDHhchxXt6UpGC7XtA7u3I7CFD/w5ommefOqGqpIl+7f7NO8bF+Qvx3MAyxLePRC+bv3rt2MCJTOKU6HwzYghQ2hSaEebo0cK03QLSDfI+qALqvov/82fsTEQwW5FilDNSlXw4j3epV8En/HTJpC7WItEds0M= X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(46966006)(36840700001)(8936002)(7636003)(186003)(36906005)(82310400003)(8676002)(4326008)(26005)(7696005)(336012)(356005)(107886003)(316002)(54906003)(9786002)(70586007)(2906002)(44832011)(47076005)(426003)(2616005)(36756003)(508600001)(5660300002)(1076003)(6916009)(36860700001)(83380400001)(70206006)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 14:00:43.7773 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd95a57d-0a7d-46bb-f057-08d99ed253f5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0008.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR02MB7438 Subject: [dpdk-dev] [PATCH v4 04/10] vdpa/sfc: get device supported max queue count 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" From: Vijay Kumar Srivastava Implement vDPA ops get_queue_num to get the maximum number of queues supported by the device. Signed-off-by: Vijay Kumar Srivastava Acked-by: Andrew Rybchenko Reviewed-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- v4: * Updated format specifier in log message. drivers/vdpa/sfc/sfc_vdpa_ops.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c index 5750944..9a95211 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_ops.c +++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c @@ -31,10 +31,20 @@ static int sfc_vdpa_get_queue_num(struct rte_vdpa_device *vdpa_dev, uint32_t *queue_num) { - RTE_SET_USED(vdpa_dev); - RTE_SET_USED(queue_num); + struct sfc_vdpa_ops_data *ops_data; + void *dev; - return -1; + ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev); + if (ops_data == NULL) + return -1; + + dev = ops_data->dev_handle; + *queue_num = sfc_vdpa_adapter_by_dev_handle(dev)->max_queue_count; + + sfc_vdpa_info(dev, "vDPA ops get_queue_num :: supported queue num : %u", + *queue_num); + + return 0; } static int -- 1.8.3.1