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 7A382A0C45; Thu, 28 Oct 2021 09:56:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE348410FC; Thu, 28 Oct 2021 09:56:54 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) by mails.dpdk.org (Postfix) with ESMTP id 608344003F for ; Thu, 28 Oct 2021 09:56:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fXwiqwZMKzJ2xo32AW85lXIbf8gsZr15lkD8FB5zsgtntX+dlbL1rOvReaPsM/QT6frVpRS5rKxVHflAZPTLRkvtW32L+i5PhWo0R1GNyQ34GmWmQYy9L0tgSnAKQMKd+3iGk/Sf+pvnyZ600Fjk9G2Hac/OLsapgVZvvI+5XrkBRQZHapqo2PRhEAYntHnfwiGvZ8S2ntRlXFa+77byLHLlQew3U70Fm157uaRQnjG5oJV8NjOct1C/K+i7koQywl7DU5htuhQifoRNuGWsYgGYNCffDgRg4IsAEArhm7D6q/D5D6pKopuTcZ3o5ren3zAGLkj/4ucn4LHxhJJo8A== 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=KZ0TJj3qshA+PCuJkw3UgeaNnb0hXgVO3wTS0fMgjRw=; b=Nawui6AlvLX2wUA+lEI/ZtltGjSRrJ83tLGylQcgm43zMY/Wq5kIkWHBCHuyqAaDYuX3EvbZK+m3EfaOehhH14BAJBxE9cry4cP3ZHogm93hpn+HoN4NDjJKDHcIIC/Lbzyh5QctOd62moAK30YvZJq1SNElRslslmOsbn/6H2rwoV8nlYPCpApxjABeMyER155Jb//GwQ3tJ5GObLoKoh0o6JHHXD9GA7ZHq+uehWsinxB6SOUHB6XoVeo8ZoOtJnqNroKxIC62XhF5CS6WwaHhfSUUyMJvsgiI74Vnbu0lpvLGgJW5UDBFAzzx0kvidyD3VtI1jvaVIdwrzXud8A== 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=PanAbVlhUodWoczYmqw0YA05CP5N5meiyiTsB+c239ONOknbA4uDszgSg9Nj9301nzJACLkjorHCetmYQVYpteAoTurT5dHL6VVvwm6Zb6Q1Gn9jwGiy0JE0RsEFaMee/nkAZ15/5ofZIjrVoGm7Dqg5MwLhi61v+CgFjsi/XIU= Received: from BN9PR03CA0067.namprd03.prod.outlook.com (2603:10b6:408:fc::12) by BY5PR02MB6100.namprd02.prod.outlook.com (2603:10b6:a03:1f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Thu, 28 Oct 2021 07:56:51 +0000 Received: from BN1NAM02FT055.eop-nam02.prod.protection.outlook.com (2603:10b6:408:fc:cafe::d1) by BN9PR03CA0067.outlook.office365.com (2603:10b6:408:fc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18 via Frontend Transport; Thu, 28 Oct 2021 07:56:51 +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 BN1NAM02FT055.mail.protection.outlook.com (10.13.2.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 07:56:51 +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; Thu, 28 Oct 2021 00:56:50 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 28 Oct 2021 00:56:50 -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=35870 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mg0HJ-0005p5-IO; Thu, 28 Oct 2021 00:56:50 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Thu, 28 Oct 2021 13:24:46 +0530 Message-ID: <20211028075452.11804-5-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211028075452.11804-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211028075452.11804-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: b1fbc0ee-e0c6-4ede-d38f-08d999e8804f X-MS-TrafficTypeDiagnostic: BY5PR02MB6100: 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: Qy6dF34RJ6MdFewIK9y8gidX43ks/xdek3X5qRl3JF8AhTdIPJ/V3iaqMVkQuDWQJ6c8MU70n/Il88vlbNsTGPPhqcV7/Hf6vueH06MvmgGe/ffw4iA2FUIaiurR+1auRiAZ/RZ21N/wvtABVrZz1Aur0ZbW3j0DiwFE0O410wOKTcD0GBnjGvL3Y/EIPhf8e8NqN/XfqyeS8K19i/BUP1J0TwtYvJKiYhMdSRDbUk8J8NViLkAZplpEYEJ0SR0jRZB9W6/nfCuzYDtOZSPS6V135upsTTacEMSR+dp8aIgcU22SJhEJZHe17tjDEQdKCZwsAs2IxDtb2PWyc8GY13gPx9wRaQTKswzfHszN0eKrp8dFNGTQD4toqSPO2dcWH/2qUJB870six698UnGoe6Mn+mLbAcmJWFakAeWXX1UWsJ9njxyrfHMXkCsmxIOVcwLFaR3l46fhPTaNZ6kabYpD/ZzMiSnlMD7nqpppvR+hVT4CO4PumUyFOhTUG9X31fLvm7HbF7hgkV4YXPnyEDIKKdXX1TT+OnwAL7/akqMVDbBlmCQZLCWk2+Y/NbfDI1eDnHb7HG43YScqzPxT2o0nCAhAb6guiARx+4dWLX0CSCJyTqhkzfJt0/k7KuvqC7eGu0OvePhLYb8fYBxMDAbu8HtNJ9ywxegfRFZZ68IOWu/phCOd+wSOaJVhbHzuZXTOPE5fEQKYLjRX57r1EIJPTY2E/2cDry3AwNBNTxg= 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)(6666004)(6916009)(82310400003)(83380400001)(36906005)(8936002)(54906003)(508600001)(47076005)(7696005)(9786002)(1076003)(8676002)(44832011)(356005)(186003)(36756003)(5660300002)(36860700001)(26005)(426003)(4326008)(316002)(70586007)(2616005)(2906002)(107886003)(7636003)(336012)(70206006)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 07:56:51.2404 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1fbc0ee-e0c6-4ede-d38f-08d999e8804f 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: BN1NAM02FT055.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6100 Subject: [dpdk-dev] [PATCH v2 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