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 8C71FA0C4A; Wed, 7 Jul 2021 10:25:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2189141496; Wed, 7 Jul 2021 10:25:35 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2065.outbound.protection.outlook.com [40.107.237.65]) by mails.dpdk.org (Postfix) with ESMTP id 982784120E for ; Tue, 6 Jul 2021 18:49:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvJ/HEspSW9vgba/BZE081YmTTJRNTHGDnxQZn32P41UeZVl4uGN01Eizu2v3krXdmL8V7NB3jnkFy6BHqfKOIhOMQaBZMbP3q1M20rBl64cpDvplhu3S2K2tBlt/dDjsCSGx4FBkRaXh+3iJXUckTJeD2fWGmVbChGtFKBLo1g77KIpyp8Ddtwm+yKgdVGYyUSS439lenXAhvr5kBM1R5xgXyaWUyUnDWc1X6n9+MHh02cqnFTLdtm+ybf0c+28KA+38docyZ6mmQyisqafEBKqSasOM0tVpS2j/bcwuRkhFGpcKxkvJmCr+gbaI+p+z9UFWHCejJS6dXNfJmxqaw== 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=KZ0TJj3qshA+PCuJkw3UgeaNnb0hXgVO3wTS0fMgjRw=; b=DOD7bcWav2aTLzTKQUdSQbHJiHJA7tjgtJ5mD7bcPnQ6abAv28Wyx+sghZaYitDVN9O7Mo4YhhEFZnrb+GshDzmS/WLCpb5J/2XEf9zzDtIhwTjXvXkmnp3Qk4eOg9exq8kl0DYZ/GFhWagGCvhvmR4G7Cm5p2UbVGkTvevpadAu0tIOncTXC/uG8r4ZgccLCymKmOtIxEzSuUAPPf+dRFs/qvldkmEtoDTxDPHAcw+xu20lI0tE9muCf+pPBJTUlEAntKBjuzL54EO7gbYjMCL5jNxm5Y2yeZaF911TDoPmF4EgnezIbWhGHCTTn3msicSm1LVuL/soNh035S8cYw== 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=KZ0TJj3qshA+PCuJkw3UgeaNnb0hXgVO3wTS0fMgjRw=; b=DemyJ3y3+s6VujooknQ+UTbQhDDRI/ksVazv+sR6u8PZwE9QMYWAXESEbja8eKnalAzp9Ynh0f7Iu/C3xIWLcs+axt+KMClTW8WuGd/TkFIErtrbTQgrn4L5CdkNFknpYji0J+R1kSymwpnUjFzhncZkW6A8J9YRsxKP/39VINE= Received: from BN1PR13CA0019.namprd13.prod.outlook.com (2603:10b6:408:e2::24) by DM6PR02MB4443.namprd02.prod.outlook.com (2603:10b6:5:22::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Tue, 6 Jul 2021 16:49:28 +0000 Received: from BN1NAM02FT022.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e2:cafe::c8) by BN1PR13CA0019.outlook.office365.com (2603:10b6:408:e2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.8 via Frontend Transport; Tue, 6 Jul 2021 16:49:28 +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-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT022.mail.protection.outlook.com (10.13.2.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4287.22 via Frontend Transport; Tue, 6 Jul 2021 16:49:28 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 6 Jul 2021 09:49:28 -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.2 via Frontend Transport; Tue, 6 Jul 2021 09:49:28 -0700 Envelope-to: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, andrew.rybchenko@oktetlabs.ru Received: from [10.177.4.108] (port=54950 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1m0oGA-0000pF-MZ; Tue, 06 Jul 2021 09:49:23 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Tue, 6 Jul 2021 22:14:12 +0530 Message-ID: <20210706164418.32615-5-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210706164418.32615-1-vsrivast@xilinx.com> References: <20210706164418.32615-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: 824e5379-60dd-4692-233b-08d9409e0551 X-MS-TrafficTypeDiagnostic: DM6PR02MB4443: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rU624m7CLBSysdYQUshzo0WBn5osm4pu5DPepy8j0GZxjFFpztp1KcwPD9Ul7pNbVJcbGkbmcSHF+hJvdRJfCKr/rCZ0cO7mekDA/JpM3Yq5LPIcTIyiNu85WJWAghGEyQxapx4ifxK5CVzD/FCXtxWVCXliq1S9S09vWcjjxrLpHBLHFRzZ+euq5lE77Rh2vVOV6IYm9OK/v15vVCLNCc4+Fvy+MPz9EHNDuURzfeMcLbg+LEEB2YejqJGws49eBzwmsQEH5wn4qZaLpGseTnef1pL6Z7BQNVQf9FVkOXJLQ2JHs+PvTqu2Mjn8wBLPKP3H0SD/wtpD96e8ii5TYS2FE+GFtVhu8WP/8SZJYdQ1J4tM/ELPcab8uTDRhEowN6GdMhHj9ibGJkXg7ysJ7oLrM0b4x0KuaTFfeCdD+JPVmOepzJ3GpGQNU6VHwWr+41BIyexaLlwCFh+jvl1SVBCmk0B25wBKJaIV2ECwxLmDVnSXFUZHKGh1Gmq8dYh89jvI7J20BS3nB2Dh9yUjn6xOnx5/qHo5HqaA0j5Z99Rw1WqNHPXHWJ+soEoPwv7wNubppzDkspw4pb2WtVs7eprFXrmvpSJD8u7xRUWCTMihod8WD2f4W7IYGc/fsrMR9gB7kasF431/e0SnoEcf+6M7ecsfcH+HXpQ5RNdnQLylWoqlZLGR8c1IAm+eIr6stez5ZXj/nQJXI9yLx9O2gq71IoMcPwytBtLp/oLX8YU= X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(396003)(136003)(46966006)(36840700001)(8676002)(36756003)(70586007)(26005)(186003)(70206006)(36906005)(44832011)(9786002)(316002)(478600001)(1076003)(2616005)(6916009)(7636003)(6666004)(107886003)(82740400003)(83380400001)(47076005)(54906003)(5660300002)(4326008)(336012)(356005)(8936002)(7696005)(82310400003)(36860700001)(426003)(2906002)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2021 16:49:28.6350 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 824e5379-60dd-4692-233b-08d9409e0551 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-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT022.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4443 X-Mailman-Approved-At: Wed, 07 Jul 2021 10:25:28 +0200 Subject: [dpdk-dev] [PATCH 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 --- 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..6c702e1 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 : %d", + *queue_num); + + return 0; } static int -- 1.8.3.1