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 C7C58A0547; Fri, 29 Oct 2021 16:49:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01382426FA; Fri, 29 Oct 2021 16:48:42 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2070.outbound.protection.outlook.com [40.107.236.70]) by mails.dpdk.org (Postfix) with ESMTP id 80385410E1 for ; Fri, 29 Oct 2021 16:48:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O0O4NUN7O//XGuRgXAKbzOrFJK/e3CkwnyuW0szy3iLqe1UdlayqgFl8biXtNxjgS6ZrBGAPSTsmmp5oAwC9ltwVpXyistwL73lFamNVnrLrDyIOWTuEqoB+GuAiC7zsKRYKBZ+wo26vIzHNxhFP2SYXJDHfOfs03+gNiX0+IIn1nUQ9des9PrWGrXkWdm3HK49BY0jhyNdjF7xSZ1yuLUmAdezdZ9uzJxrlDiJGSgcrNKppD025qEICa6dunSsfadpveUPtprJgw4460FDKjODE7BLgFc+lcuyJ6CFW8eALWLrL1zOV3RSP90H4pbitWuxx5cyIU+FdPkG+snyBKg== 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=zZ8AjfUCo71GsjOSwbykYCoQ73Oqey+3YSWTwOh6rbE=; b=lK7fepTTxT880Ba5FSZMKMfa/0sryezdwzLYH3R3G1Xs9wtgA3F3Z9Uvg8qIKuGGu9I3AFdJdX9qhSZrtMG5ziXC1YTaYOf6qJL2CW13Iz87D9iNHOp1gZxaArwO6vPUDpF4D+tKLDjTz3Mn72W+VcxvQLfJyEFKWLVQLC8rLsHOHFtLt5U9VXUqIqDHsZGVXOumZanucISWS9HFoJd2Nwtt4yD5GU0975EdKISUdjhUb2Kd6xE1BwiYX0IsrGjKTfyD4B5wCm8ci2SS0xbeE7OBdoPE5mX0pG4CsxezNsdVO+RCip5hpQh5rgDTHTsCP7UmLjO7dXBh4gTHlHks8A== 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=zZ8AjfUCo71GsjOSwbykYCoQ73Oqey+3YSWTwOh6rbE=; b=jtIpKmoLEEBgJ2D64f1LL+YdwpmxxHHONgZ5ed24krVwBn6+ugUJtursOGnsYS4RMoDmLLioPuL/7n8x71kq3gDGmRhBzPHhIFUgQ+R0s8OZj/M3MFi9DlyW1vwxlg/8L7CpwZvAZeXEVDuADoXdMxen+t9f7a7f3CPG8x6Seps= Received: from DM5PR05CA0013.namprd05.prod.outlook.com (2603:10b6:3:d4::23) by DM6PR02MB4075.namprd02.prod.outlook.com (2603:10b6:5:9f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 29 Oct 2021 14:48:35 +0000 Received: from DM3NAM02FT026.eop-nam02.prod.protection.outlook.com (2603:10b6:3:d4:cafe::53) by DM5PR05CA0013.outlook.office365.com (2603:10b6:3:d4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.5 via Frontend Transport; Fri, 29 Oct 2021 14:48:35 +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 DM3NAM02FT026.mail.protection.outlook.com (10.13.5.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Fri, 29 Oct 2021 14:48:35 +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.14; Fri, 29 Oct 2021 07:48:33 -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; Fri, 29 Oct 2021 07:48:33 -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=36706 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mgTBI-0008YO-VM; Fri, 29 Oct 2021 07:48:33 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Fri, 29 Oct 2021 20:16:39 +0530 Message-ID: <20211029144645.30295-5-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211029144645.30295-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211029144645.30295-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: c4a99663-06f0-4099-5148-08d99aeb2f79 X-MS-TrafficTypeDiagnostic: DM6PR02MB4075: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r0l3JWjZG1t8YQK2n3YAgRFEFNXSk3yI24BUkKF5GiQ8S7DguiYxXB5T2Fq7McgRyTCZgZktbIqvU0rQFQbscHFXNYFsH+LiXlTtfpxYbJgF35s38QrAW8UX2uUjX0NvUPs/XoJNeGKHHAZk8sn/WjbHWxaxvMh0mOnBUaFTPRNI/xvj84Szp9C7+yho4xi+NW+MhSVAPwnv6oXupamYDrY4iMOkdH247RjzLVBC3Y23WSBDdknv0hvta6+LNKZfGBvXJKpccV8Te8XoOg3Fp22RekkjuNwXviIzN4Rt9FLI+Q+99+i2X47DjBAznuqlYe+RCa60WkT8mpd0K3Ve4VS5yFidbNZm3nEhpxxF/ruUvJayE8TQmkhcz2nkC0CyKFjKHOWiSYcgLObhfqCAubPsM00zXSD14tCKXYJ+ucPXq60HeRrOkdfraEQ6aeK9/W4TKAv8N7YQpeRSFqdNZIyHAlgLYilHEnvEpzuSGv91K3Czdc2IwpF7Wpn9iEerZyNSYVCz5LxbxXYx9vW3bYtmJJBX5hiGWXdxG0H+movSrrM4Z+hl7WLU9mgEAIJGNRBBEB7xm1joVAY6wXxZUsEwMxBNl/Zq0pIMp/GyeHn83Pm/ZmMY1wvmUipPV/4sE/YPJmTNNQR0BOM/CCcGcFrCBevr1Ddgtnmb29BKKXXSUqET3hqoAvvQOeqKiiRPqfbHpqj3IBubgM/KwvkyonpRHDU6eRXbRyybqoKuOWI= 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:(46966006)(36840700001)(2616005)(5660300002)(70586007)(1076003)(82310400003)(70206006)(4326008)(7636003)(54906003)(47076005)(2906002)(336012)(83380400001)(508600001)(107886003)(8936002)(7696005)(8676002)(186003)(44832011)(356005)(6916009)(36906005)(316002)(36860700001)(26005)(36756003)(426003)(9786002)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2021 14:48:35.3208 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c4a99663-06f0-4099-5148-08d99aeb2f79 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: DM3NAM02FT026.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4075 Subject: [dpdk-dev] [PATCH v3 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 --- 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