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 CA615A0540; Fri, 8 Jul 2022 09:37:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6170840A7B; Fri, 8 Jul 2022 09:37:14 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id EC761406B4; Fri, 8 Jul 2022 09:37:12 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=arKGT3YEHlALDC8iPbcZAPUbs4kn4feKYgjkfHZUy7Q/YNh7g0WGMLC0x//RzmtI2Xt5F7dPu0PrYLUgtrrudn7iV+IbCb9xxDLFd688JgxSgnItiDxGHnk1wEXL5fL39j7Cv0elAYdAcot0y3pE5lBed4kTrdNlcS21Nt7OUNHQ+YMA9go9IC8CYb8f30VVdZtRy/4/R3hF9bWQGKWMbc2D2ylGV3F17oAL+P+xDFEvaZSzb2fpue6dGZdwWmocFKxlq9gmGWkHIeEHQeZFgdySHrWqjTBk74nr4SVfONbOgYE+peXoR/L7JSZHRZ7JshrkIgfeIzYbsevCXH9TCw== 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=wXSBP0ZZVxjW26u+V+T+rbGc8OLKvrcDUX8eaNZuDUw=; b=Zey9vTu7vHdErk5cj47PYwAJmuKa+OxIqgZEldYKVDIwWjxJrQuwd7PI4jhaRmM/Uu8BFkWFNtomugfBivFLNjDJamuLdnXI6QtF4SXCd7XIEWqoql08GvOIPWeD2XNIA9mzE+M6zwqF5cvMdq2LG1suWpDKOm5/FFwu++OBeS2GA5tNKhihVVD7/2D962NE+vGcQy/r9m2RD1lO73vqXuMYsQi9Ng5GWxjne00R5DXWdRwsSVch5/J2oZPcqIoCESF+d+10QYPmwLnb8LLy6xFS0vp9q8AocnFVfYD2wuUdxTrVXDqCB8QisWmCtL1v+CUn05gWsss3arZALcr3qA== 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=wXSBP0ZZVxjW26u+V+T+rbGc8OLKvrcDUX8eaNZuDUw=; b=pB936pyU2DpVlmRYUu8S2/JkAznrkxjPS7Dj8Uk13C9fq+kaMSJ/3YD0r9mbG1w/NfiH1r2dO95D2a1s8Ye7FuhdFrnvkzW3PJjOby2u9bYXdOjXTKkpRRJCVcgmLgR6eQDkDAwn09Lx5w8tCm5k0TnlfSIDirxhEyK9pAnRzRIpfn0jJkzBZxC91uK7cOyCvMrxj+S8CdbdG2mq/Wqq5i8nEIBo1/sEbJJ/Ywt3JxdH/VBt/+TgIEoWWc9A3dqLkMOU1sWfG8HKL73Gsi73SRbcR0o8/htkVIf/AGWj6cic82wUVnR1Egzsvg73UYmtMoAiQIzKVNJt/YzR5zwt1Q== Received: from BN9PR03CA0272.namprd03.prod.outlook.com (2603:10b6:408:f5::7) by BN9PR12MB5033.namprd12.prod.outlook.com (2603:10b6:408:132::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 8 Jul 2022 07:37:10 +0000 Received: from BN8NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::db) by BN9PR03CA0272.outlook.office365.com (2603:10b6:408:f5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.17 via Frontend Transport; Fri, 8 Jul 2022 07:37:10 +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=mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by BN8NAM11FT051.mail.protection.outlook.com (10.13.177.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.15 via Frontend Transport; Fri, 8 Jul 2022 07:37:10 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id 7E9C942683; Fri, 8 Jul 2022 07:37:09 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XBSNQtUfcz86W8okG5PWUPHqAxXrbN1yv0sHykG1L7WX1hAARqdpp7ie8BdxmKkLEynVaQaKf3j9nEiOOnnt2zu7fGkZF6LRXS8VIOK/0Mn7chC1Vawx/4NHPkIRC7wqO453AIR1FI0Bmg6wgZQIRl6lMo+vggrIAvSxQOnqVxRolhg7krqtMKo8N24QbOFhlYFk4kAfl6hwU3nMbfU8X+DIYAJRBu3j12uAiketupdjA68qotvWVIaLkk4Jn5YodKuy9HAognvDjszUvBdrIgBDk3QuG7fGxQFOq6h5OD+wE72N1yY1qNBI/zak0CTfxeMhec5mYxbavxe/ifQRtw== 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=wXSBP0ZZVxjW26u+V+T+rbGc8OLKvrcDUX8eaNZuDUw=; b=T/FCXT6QGW7EDHfknXr1rxZwJQYm7qPvq0n+mQ2Lg1wfLzE1udAbMkoMV3dUlrtyCgN5Y7AXAOA5lXKe2y/XerJ/n5NxPJzOhpqafh7sazg9j9TF8ZjSCNRo/9pFR2CemuGXfKh0gADb6U0wo7vaA/I1P0Bml1496PiUw1qNTh+fyUm9Q2mIFww7uxz2fr1J95FCwJrzdJ+vUlOdbU5OmAP7IMhnSoxLkUQgnq/fJQNcXnmIKq2R0a/2N0m3FijxyoTqrxHRnR2HK9/TJ1BLQuGBJHLMlcLOO43ZqNhh/aNPfJmjBc10qT9cnZG56adNZaBHt20ykkirWHhsa/oKKg== 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 SN7P222CA0003.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:124::21) by BYAPR02MB4950.namprd02.prod.outlook.com (2603:10b6:a03:47::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.18; Fri, 8 Jul 2022 07:37:07 +0000 Received: from SN1NAM02FT0004.eop-nam02.prod.protection.outlook.com (2603:10b6:806:124:cafe::22) by SN7P222CA0003.outlook.office365.com (2603:10b6:806:124::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20 via Frontend Transport; Fri, 8 Jul 2022 07:37:07 +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-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0004.mail.protection.outlook.com (10.97.4.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5417.15 via Frontend Transport; Fri, 8 Jul 2022 07:37:06 +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, 8 Jul 2022 00:37:06 -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, 8 Jul 2022 00:37:06 -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=47546 helo=xndengvm004118.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o9iXx-000Bx4-Tp; Fri, 08 Jul 2022 00:37:06 -0700 From: To: CC: , , , Abhimanyu Saini , Subject: [PATCH] common/sfc_efx/base: remove VQ index check during VQ start Date: Fri, 8 Jul 2022 13:07:02 +0530 Message-ID: <20220708073702.29391-1-asaini@xilinx.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 7e3d5974-fefb-4dd7-54ee-08da60b4aafa X-MS-TrafficTypeDiagnostic: BYAPR02MB4950:EE_|BN8NAM11FT051:EE_|BN9PR12MB5033:EE_ X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fYAwAzyAmvczNbARIYotvZEKZ9nx/+9btsUpN2S9m+tjV67svLXyYxlN0kLxZK3onULXdoQfjmN/IN48Fgabn94N3470a3y6HrzDvwulsazUK1LVMlpXODAa59piGLWVLVV46eeQjUgmTz8GDqsKjI32yLUM5IJcovHUMX2ZFk8JUzkhyHo/jwXMin5DZiGOYJWmccc4IXKzRqdlAk5S6Vbbjad6uVz87efdwF9MyI8P7GbziDuxODTmQ7t2cq1571Z6zVut3evJJhrBb+JIJ8Sds7TBqktfXjgu/8XBpt3CS/bF/U94r5NwLQ1bCp8oOjS9KO4Hg+Rv6gMr+XKo+C4a4hSkrgZlgdNAhjEeNNGjeO6FdCKJJPZ/f3t1BvyVGINC6b4kKdJl9Ev+nMQgwq6wHYP0s32yBNAFJfdniCH7wUNqjVONFAWpLBQM6X1vngXzpzztK9IcOTNWRnVqSEMsjPHMC4G46Mw1Gsg8SN4cctn7UNWw2p5P6IZCzVIBO2hk02bzeXuDRkWNPKjJQ24l0mhWYJgPJEv3C1jiXt5h4TNd5b0MupAUyD29To5QbLYRzUiEZD/PXXznC+YiSKzPUNUQXDiN+eX2zKfmqw6o6LI+HIxv7YPoVv2YrvmgIKmRYJwN5b6+X/QaTy8C0QWYrP0P4t4xi9c86wS1LEhx04cYqWvO5Fm3UJYxuLHVYtkCTwX6KzjhOin0j1x87y3lr4NS8f850AwbG9KQEU0g0v52mudi3qwINcX9/+Hwd2cF2L4x/cMOLq5z9unY950GGH+AVxAfgbrtM7Yad04A0hiFPkNS+Q034xks8uKckLjuvgfgwhBZfn18/fblWxni4fr8umnIb7csWZ5hRzk= X-Forefront-Antispam-Report-Untrusted: 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:(13230016)(4636009)(39860400002)(396003)(346002)(376002)(136003)(46966006)(36840700001)(40470700004)(70586007)(2876002)(70206006)(82310400005)(26005)(8936002)(426003)(356005)(36756003)(8676002)(2906002)(83380400001)(82740400003)(9786002)(7636003)(4326008)(5660300002)(41300700001)(40480700001)(47076005)(336012)(6666004)(2616005)(1076003)(40460700003)(54906003)(186003)(316002)(7696005)(6916009)(36860700001)(478600001)(102446001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4950 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN8NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 795ac364-3966-4a3c-0bb4-08da60b4a8ec X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 25uUEgkSZcIsXJ/wV4LIuEPgtSMa7DiiJvumR70GqHjIbA8QwElSw2jhcxdaIERUxJdo+LjzH/sSOlN1pIiRhr5V4n5owkM8UY/YgNqDfAoHv3aNhlqlG2nBBH+LkCPyq8CtaSPCS4h56Pb1W4VoAGoj7/g3T7vjj9lJG+bQloMURmJ9z/sOYp6suR49HK6MreSb+hndD5e6gSf5aqU9CWFjSEzOve8W/7ThEo7GCjfyVVUxMkBxd+9dKS+qgAM18j2vC2S0mPq6JLcg23PapAHe4oDsfC8iU1eSlecp5RHq4dG0pgM1ubrzJVicZOS+o0fex9K8iA58Nq4+rALIV4nkXNGkQqwivCiGPBjgmB76j//+ZB7pu97FoeEjL7rXLto2t/eWsdU79qNzlsg+X5eH91v8EJi4O3UDWJ6JU7hpl6a1mF6OojYCtjR5fuIJI2mIuOe59qQ+0Lxijcae9OXt+0oeiAPPJriCAa+Y7BCD4iLGN3Nu3/Cb98kwAPEkn0G7AzUBGTSKGhF+nmcmf/886WfWtV3RfYT3woL4b7SvwN9Exia9y85ysWHoFvV96mVVJj5DZEIgETTyahNuDTLBx0WcAmglnUChBCMpbyV1PDWj1Z4fJG3ybIN8s9ZUkKfOKAOOkwq0blFovWng4RBwtzzl2CASaC6Pc1UGs15Cf3rvayi30Dn9C5Ylvr/HGmdpn5Orp9EONj2zhN/0hl4jp3BkyVHDgq0QYfPtFk/aK4DzEmSc5414BhNZyRASzO5rB2WBi17ENQXwfgrXEAl6eQYhm7/X3CiLAnr3xTua+FZBNZT6ulqEEqeAgAmVxrxu1z03KUTqlqVL/BaWopGvaODJzpCcK0H5WZoOLVeeVOpmYkQib0Ra6X1qaGeLJAIMNFM7h0i1tzThVFY/v8ku5t5lj2L7LpeJVftji68= X-Forefront-Antispam-Report: CIP:20.83.241.18; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(376002)(39860400002)(396003)(46966006)(36840700001)(2616005)(26005)(2906002)(186003)(7696005)(36756003)(42882007)(478600001)(34020700004)(316002)(47076005)(1076003)(2876002)(336012)(40480700001)(82740400003)(8676002)(81166007)(4326008)(9786002)(41300700001)(70206006)(82310400005)(426003)(83380400001)(5660300002)(83170400001)(54906003)(36860700001)(6666004)(6916009)(8936002)(102446001)(36900700001)(84790400001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2022 07:37:10.2446 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e3d5974-fefb-4dd7-54ee-08da60b4aafa 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=[mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN8NAM11FT051.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5033 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 the descriptor entry index is calculated by 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