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 54237A00C5; Thu, 14 Jul 2022 09:52:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6DED41156; Thu, 14 Jul 2022 09:52:27 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by mails.dpdk.org (Postfix) with ESMTP id BDE4142B7A; Thu, 14 Jul 2022 09:52:25 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ENh5TZR2COt4t/UHE3/SThE+CcU59A9e8n9k6l09LCgaPXGNPOmn3cfNRLKSKUiFbbDgW7SRBS4UBbTFH/x4r2H81Dfr23kL1lLSyVNHYVwhnG8f/cgIwaut1LDCJ0r7ntru7k+v1W35//jy5KeAKPIiupSmkY4cFsRssktMrUR59dnYjCvs+MNxd4NbdCLvOahp6P9IuBm+s5nV6RI72JgKrug1Y+lHMbw9pHOePK0Ne6VwkZ7ghSSHx81QiZrD7IWh58usdOLV2WSEV/LiP9uxgsy6Sh7urMRlv41uOZSuiHrVIHKkd6r4/8u8tlBS+W36X43W7+B8/dSatkZQMg== ARC-Message-Signature: i=2; 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=+3MzMSpPspCdMBMO+Z+0cCfyI3DxNfV9r5I42e16DBY=; b=fY90vboCRW/iY5BjEpT9mqwnrQa45p43dnYaAIs4zJjgtogiIai/GboAvNohruSaDfJj256e/GixKrFGikZBJUBnhayIVsFm+1cVeYbTGyk3E4hKgmh8VM4aSWpNsGx/t9fpZqAqGRKqB05CntE5/i0Tj/blQM3TJNVqDaZe2ahOL2rvMwY5717hKJx4cb4IikOs7x5f/AGLx7uuq8a3AF7/Kq3DiQ2tphszQljHMTUEwUqQBrVw3i8AFJirPSZEIoIY9NAVpgTPqhUP5tD4Cf08dPJ6NyKK6ahwZ6QrRZw9WxPJ2n5gHEI64jD0boluxukRR75fb5qdrC7pGvkKXw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+3MzMSpPspCdMBMO+Z+0cCfyI3DxNfV9r5I42e16DBY=; b=ikIu7ii0ZQPXemvvl23+BPsdDy0C1GX6tZgGD8NynPTUQymiNHxhE/kpZ7BKOiToDTnLrkZ/E097PUh1iaZv3ZLSkmk75Ziff61aYSddra2/7RIInXClFc0PWrcCNSOA8Xr9koThUSCk0yR6WN7uDHsUMFIShkZ+p0a7yt0bk3phXGCdNRdc6SWiq5RNNoMVOiyYWORiLY7mZyPLWGz8n8oHew67TaERs0ufQLJlJL0qDDzx5urdFOKIbhxGUTtf20FkOrBsySt2qHFSTjnuGseAbeQi2WV0q2uqKVDulwzNMMvzacm10xuC4ISJAhyNSb31UCVsoKWfZYvPqYHshg== Received: from DM6PR14CA0059.namprd14.prod.outlook.com (2603:10b6:5:18f::36) by BL1PR12MB5110.namprd12.prod.outlook.com (2603:10b6:208:312::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.23; Thu, 14 Jul 2022 07:52:24 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:5:18f:cafe::74) by DM6PR14CA0059.outlook.office365.com (2603:10b6:5:18f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.24 via Frontend Transport; Thu, 14 Jul 2022 07:52:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Thu, 14 Jul 2022 07:52:23 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id E29B641D00; Thu, 14 Jul 2022 07:52:14 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3QDPmp2G9BuAI+klESXlBvosGyitusNFhPoJf1TK2Csiw3eYoBdd6f3zaCnkzNSjjJINFtahwYLwULebmFY5NLpJ7kiwzGHrAxTlsax+UlbKNpUmG55UpRooU1I5eZey1enmMXohDhckovuDOwauZtlmTsZQegmwmWfeVwLoH70d2xqE9GuFpfv3AoXsnLAtSaOCaJVYbuWbCHMWZv/zRlqH9jtXXvllcJehvODWbUmW29GhSmT/6SVD/OAIZpKnMg1+56K4YfceQ1nldXiP/3pXZhG5pUu2Ypo6KSojPjFQeVlLGUHCaxINu574Buvok73ympcRbGC5NfqkM2+2w== 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=+3MzMSpPspCdMBMO+Z+0cCfyI3DxNfV9r5I42e16DBY=; b=Nq0MwAqQIZHvFMgDgM0ApuTzITRaPbak/u+YF1f67mmctqsBcBJOtAoNTPApfIkLqUaUwER1qPUtHKpbps1QEtbKORfgc1q5mYBO3ZGUQEICQQfDC8IlXztGAe22ZS3k0Rea1vEFqtq0+ll5MHAHlSGeHEElLPuYaoguk3xjLfABqBzZRx8WySCqbxwo3+8ktChSX941cVxrtsvPPJC7nVbDs1jHPZNim7tv0IgPYvM1Jg7xMFYOYNNZ47iPVyN+9WXCCd0kF5uPyTFLqKWQGF61s/IyFh2D/ACobSaR+mNGABFNNrcaIpEkEU01c0AE7pPXpNK3iLR3nHMyJXxUtA== 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 Received: from DS7PR03CA0037.namprd03.prod.outlook.com (2603:10b6:5:3b5::12) by MN2PR02MB6718.namprd02.prod.outlook.com (2603:10b6:208:1da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Thu, 14 Jul 2022 07:52:13 +0000 Received: from DM3NAM02FT049.eop-nam02.prod.protection.outlook.com (2603:10b6:5:3b5:cafe::fd) by DS7PR03CA0037.outlook.office365.com (2603:10b6:5:3b5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14 via Frontend Transport; Thu, 14 Jul 2022 07:52:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT049.mail.protection.outlook.com (10.13.5.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Thu, 14 Jul 2022 07:52:12 +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, 14 Jul 2022 00:52:11 -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; Thu, 14 Jul 2022 00:52:11 -0700 Envelope-to: dev@dpdk.org, chenbo.xia@intel.com, maxime.coquelin@redhat.com, andrew.rybchenko@oktetlabs.ru, absaini@amd.com, stable@dpdk.org Received: from [10.170.66.118] (port=50692 helo=xndengvm004118.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oBtdq-0002Lo-Bu; Thu, 14 Jul 2022 00:52:10 -0700 From: To: CC: , , , Abhimanyu Saini , Subject: [PATCH 1/5] common/sfc_efx/base: remove VQ index check during VQ start Date: Thu, 14 Jul 2022 13:21:58 +0530 Message-ID: <20220714075202.31826-1-asaini@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220708080135.31254-1-asaini@xilinx.com> References: <20220708080135.31254-1-asaini@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: d5d42f7c-af93-44ee-f432-08da656dc995 X-MS-TrafficTypeDiagnostic: MN2PR02MB6718:EE_|DM6NAM11FT054:EE_|BL1PR12MB5110:EE_ X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: H8MLC3+9zGDo4alda9k6+yqiMauz2Vy+peJ10JY+R0Lpm+uNPYFeODvhmBGQ0JIlz4IWkwFPVlyMfLsQvuMWBl1lZ/pJF499QjCkd9qMlgr+FnZTkOMsKThkQirIdII/GTnu7tB6jJwAGijX+ZQkW/hoD6uv3z+4YdLjlx6fsiZFg6brCrw0tA7YeFiLWDWoax7KIVdqqDFdNXt+tzThlTHn53a865uGFJ+mA7hbqE8Ds+227nDMGJORkhjOeyV0WML13N6Ei6c3wh5UM5UeQG5+BaLsm090bsO4th2igT66VOMy1wsAqtAqgYyAdOGZos2ZS2YkZG06C2kpDtcGxg8yhII67U74cDWhIym1/h2XlGBbiTIjb3/jqG/9tV14mOSV523rcbS2WSeQ3fF39WsfNU+y6SLYyW1VJmdKA23HIVE03+AiJ1JvY5wP8gmq700AWIfwVZ9jUONQSBEzLAD5VtPHa+DGQt/st5J50RTE7l/za+WX0C3uGWNQr9Yyx555nGDOLZpZzjvPGcH8kPecfeRCkYf94ysLl0MoAhMPjroMgSDbGCvLcLcH1gILc+etpPqjgQayxTo9VyWdazbmQVUlpytM73kPcJrTE7uEvOrrstfWN2BvQYhkBV1Ip0FabSuXURR5obx4HnWcUzXkralPFhUG7oI4XYryXEas8UdEmkqpomdIoV+HuSile//iDG4TBNSw/yOK5h2rGg+XJidgAGASg4hW0Jah3n7rZx+0gfq8w7Zv030pW3rCw94H0x7ePXg53DXWqNHxbY3w5C1rNf9OFRYsE45av5Y7CMtuGenbsJBLScLIqj5qTlAe9E9IcGQXcZpDo5yJ7BPBkG8UH7cgmLepKkF5+Dw= X-Forefront-Antispam-Report-Untrusted: 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:(13230016)(4636009)(39860400002)(396003)(136003)(346002)(376002)(36840700001)(46966006)(40470700004)(6666004)(41300700001)(70206006)(2616005)(8936002)(9786002)(4326008)(8676002)(36756003)(2906002)(83380400001)(2876002)(36860700001)(5660300002)(186003)(40480700001)(47076005)(7636003)(7696005)(82310400005)(82740400003)(356005)(478600001)(6916009)(316002)(336012)(70586007)(1076003)(54906003)(26005)(40460700003)(426003)(102446001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6718 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3e82fe36-cc3b-4ff7-e52a-08da656dc34f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GKlMIlpCGECOcWmdhkRNavrGHj+zb0pKME4k+ierEbuzC4YhWSPfJpUSl0lz7NWohxDliIA91s7ruHnOL1naQ9rn5RsHIHQ3kDJahcLGMdimh25V5QDhrrwS32Hy6fTnKyAKn2qxvU1JER1iCKb7FVVIaYjljAz/1j328Wf1HHc1kl8orERzsK41NhPA80+0DWH0Ylkzs14olLJlZ1RV+wuw7nB2J1ehiXIMTJJUMjKNU4qMWkzeNlUYdTburHzho67KgJgyAL/roPToXCZbHqUb4aw3f0+STSEVXbDsJON3KcoBPnndNUIvEvw071nCac0NYrlILj8RFeb4WKHNgU71M0YuXyUYDYfl4TdLWjWEegU1J8ROIvrOYsXPaP2vE3ONk3hOzmZrrA9+3atyEknGwSni7hg4sB4KhvddRVoZBavBcnCOlnX4VFUM5pQMZwu9rg9oRRiE+5BnSEKtsxyMYT6gDmVIj4knaMQUfpjwPoEBD9M8EcjgkIV2hIjkNWwEDvpF2E7PWKCGE/ckW4cfAbIkq8nK68q7R4cpMhlHz1FCyQsWe912j8XN7cQuBYGBb3s54NRlZo2pokXhmYbGKUUQBqQxlwdCfkguUigpeqeJGsiJeYIoGO4/WeXjnthullzsXxD0Wiz9/5iG4S0I2tJ91uSj7bnvwkPrfgpQ7hROvxfS4UeWMqzb7eFfDUgRHSA762qj0YhnjzgAJVVFcOm52oTLws7SNy/xsnbhIJtgBkrqVLO51gMnsicoucS393vrTUnRzoAoN55zs+BU7Q4/XBCrx2E/9WG5MSdG5Su5AahLox6ar3N0UzmzT5lz3meHcXkzlkdubzkn4iZRfGStm4BWcIVr89CbzVk= X-Forefront-Antispam-Report: CIP:20.83.241.18; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(346002)(396003)(36840700001)(46966006)(5660300002)(7696005)(316002)(54906003)(2906002)(81166007)(6916009)(6666004)(36860700001)(36756003)(26005)(41300700001)(83170400001)(478600001)(82310400005)(336012)(1076003)(70206006)(4326008)(40480700001)(8676002)(83380400001)(426003)(2616005)(47076005)(42882007)(8936002)(9786002)(82740400003)(2876002)(186003)(102446001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2022 07:52:23.2828 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d5d42f7c-af93-44ee-f432-08da656dc995 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[20.83.241.18]; Helo=[mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5110 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 From: Abhimanyu Saini The used/avail queue indexes are not bound by queue size, because H/W calculates descriptor entry index by performing a simple modulo between queue index and queue_size So, do not check initial used and avail queue indexes against queue size because it is possible for these indexes to be greater than queue size in the following cases: 1) The queue is created to be migrated into, or 2) The client issues a qstop/qstart after running datapath Fixes: 4dda72dbdeab3 ("common/sfc_efx/base: add base virtio support for vDPA") Cc: stable@dpdk.org Signed-off-by: Abhimanyu Saini --- drivers/common/sfc_efx/base/rhead_virtio.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/common/sfc_efx/base/rhead_virtio.c b/drivers/common/sfc_efx/base/rhead_virtio.c index 335cb74..7f08717 100644 --- a/drivers/common/sfc_efx/base/rhead_virtio.c +++ b/drivers/common/sfc_efx/base/rhead_virtio.c @@ -47,14 +47,6 @@ goto fail2; } - if (evvdp != NULL) { - if ((evvdp->evvd_vq_cidx > evvcp->evvc_vq_size) || - (evvdp->evvd_vq_pidx > evvcp->evvc_vq_size)) { - rc = EINVAL; - goto fail3; - } - } - req.emr_cmd = MC_CMD_VIRTIO_INIT_QUEUE; req.emr_in_buf = payload; req.emr_in_length = MC_CMD_VIRTIO_INIT_QUEUE_REQ_LEN; @@ -116,15 +108,13 @@ if (req.emr_rc != 0) { rc = req.emr_rc; - goto fail4; + goto fail3; } evvp->evv_vi_index = vi_index; return (0); -fail4: - EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: -- 1.8.3.1