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 09783A00C4 for ; Sun, 10 Jul 2022 08:34:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04C9942670; Sun, 10 Jul 2022 08:34:16 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 8412340A83; Fri, 8 Jul 2022 11:17:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iI2za2K6xOZrs2q2AFkbwzVU3p87aFyFj1Dey+ElkPeB3wnLaULBk/KpIWKzL8oMCoMLfABAdRlH6CPJqCRptDdIWfqfq9Ya9hf2jyMBRkEV1hzGqmeXijuPVCaKFVgHc0+g3wtYAaNehJ24OAnurAzdgd1JrfS14yJU1ED88rAOUnOKlTTadvFBSEB72jtMvvNjXtXVi3TgWqrJJeqGPDTk2gjQqxoqzlgZehCA+IhECOG8K25YVWyE8iBse//Yja9vT7iZ0x5qqFSzoF01hc9955GAJomrdwTGfyl2Iuy666zhQsjGuoxVsCxQxJ0Wygp7m7uBryVcwJyPFchD/Q== 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=jHoTIoQGtzV59DzWyQdzTght1k7GbD4lIgJGWGDp+k4=; b=knYa5CnqeosIpxq2lVgKi8p6uaTndZwKqmXcBVrStZQCTzKB+QGrOlaifopLEAFsWpo6O1zDekw6K07cZ07ad0+1WfTqvfUW8gM6kndwYFopN68cJedBj/MApH9bElHi1V69kE1rscyNCv4I4GwqXE8/ABBoFTXoPkRB61Cj1mqG+qMIC8BSxN9iRVULGaswJP81W75rgkA/HI5pDipqAzrTZKk41TmFTu1laqsKVnB7QbkbYZt+NeIEsUn5d3QX10rVhRuA44roPuySdtdoIzDdZ8I3l8DPlu/EbY3qhnDCrH0BtOrr/56iV7tncP++ZihCWiVufatkZoz/4LbINQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jHoTIoQGtzV59DzWyQdzTght1k7GbD4lIgJGWGDp+k4=; b=ioaTMLTklRTcD4/BEoki3svDXCEVtorppxTUlvTGYwdjNDY7Clz3fZgM4bDeHdssJbPJje0cVK06xtPYy0PXgtHYjWw+TWb82oS9OHFI9OmQbzwztvdMKmTAf/CkEgXCVFj7myt9VjUB4cILnHW5dU7H+ACc8ba701iryyNVhaA= Received: from CH0PR12MB5347.namprd12.prod.outlook.com (2603:10b6:610:d6::18) by DM4PR12MB6010.namprd12.prod.outlook.com (2603:10b6:8:6a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Fri, 8 Jul 2022 09:17:34 +0000 Received: from CH0PR12MB5347.namprd12.prod.outlook.com ([fe80::a9fd:421a:7e4f:dbe9]) by CH0PR12MB5347.namprd12.prod.outlook.com ([fe80::a9fd:421a:7e4f:dbe9%7]) with mapi id 15.20.5417.020; Fri, 8 Jul 2022 09:17:34 +0000 From: "Srivastava, Vijay" To: dev CC: "chenbo.xia@intel.com" , Maxime Coquelin , Andrew Rybchenko , "abhimanyu.saini@xilinx.com" , "Saini, Abhimanyu" , "stable@dpdk.org" Subject: RE: [PATCH] common/sfc_efx/base: remove VQ index check during VQ start Thread-Topic: [PATCH] common/sfc_efx/base: remove VQ index check during VQ start Thread-Index: AQHYkp2JcPX4xLw/f0OZWFL+aGHDCa10L2mAgAAAIyA= Date: Fri, 8 Jul 2022 09:17:34 +0000 Message-ID: References: <20220708073702.29391-1-asaini@xilinx.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-07-08T09:08:55Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=02bcf1e1-4216-4ad6-9797-eff888338654; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 050305f8-0d87-4fd7-c1a3-08da60c2b17c x-ms-traffictypediagnostic: DM4PR12MB6010:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WzI2q4DGxn4sagDL/nkHpH+q3eNT9yUxYuWxrCX9acBIZZ4Qt82w9vfpc6nWRuOOt28LFhpowRikVDwk9h+9aqnE7yg0nj7EjYryq89I39yMNzSb2gTR25unH1o/pTsrzCsJNjSNNN9RQczG80k/IGwTabgNT2JEUhPmeu7/rgbF18vMbmI1aoriXGQBuuL+3wItr32Qmy4vI554IiK0kSjFfHbAU3mEuZgqs8ulrvrc8r2/Yir81WRHmpSyik0nn5tF7H8kU/DzUXC13WSW3iAbKVnj7/j6/zhbilY5MmkQscJdMtSsI2dysp1PkUmIczpYQR9eQuXChfiQl6nVVTL7iCmPkShcjX76aIi+vwnuKL98eIXCt6WMIUlFC16jPPligHwO3sly2RS/C9QIsw3ZkCIkKMbGwh05HAJozSz0ls6LSumXZf4IBhF60S3Z/j+yGGm3iejJkvUZnJlDwyLFLd5vvu5zLnD+r2M4Akxq1k8Ogu6b+AZtLM4Xlh/neDJ/9CPv0zlA9g8v6Jq1g9lwPE9MeRXojy2iVDfW6lxJehrP1T5Fn3tvudl2Yk9i/M/eIF03dxYvEjybaGy03rIq/hsgtnBzgHADgWw1en8FXRvd+viqGXb7ZAt6/oAWuVTF+E45lkmo9WqRsCP1GXzljTOcZl3tcJK5FmzXSr8CPLkNq0zQaMs4ryNzid+uIjZSGA9hrMmcUnsTCjuQ4YtYiXdmqsa6ncLoiX2L6ATmGiSg8FGFqirpSyrrfWSHgiB5xVXwv4zxKM9t9nlGw7J6X2X9qq5YPParW2h2F7auRFbbHT6XCXto1LB0T+u2 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR12MB5347.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(136003)(376002)(346002)(39860400002)(366004)(396003)(55016003)(478600001)(41300700001)(33656002)(186003)(38100700002)(316002)(71200400001)(52536014)(122000001)(8936002)(66446008)(6916009)(64756008)(66476007)(9686003)(66556008)(76116006)(8676002)(66946007)(26005)(54906003)(38070700005)(6506007)(7696005)(2906002)(4326008)(5660300002)(83380400001)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jdIecVIqNuZBXy7Tt0uDOZjdCd5rIF/uBYspu5u5w8NZcv9vB58T9GwlCY8M?= =?us-ascii?Q?HXnbYEoPn2YX7zh6aDtt8IntXZ7q4vw5KOQ8HZsyQ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/gcnBIdUXucL7ME1XFrXwZzbDxc5fgQStHkIImTt+JcZiP?= =?us-ascii?Q?ujcWbJXIhkgDx1J38U2oNpc3b+fjERFOh5XvXrTdvfrf1rQeuuWUDuXo0vMQ?= =?us-ascii?Q?KFKskvkNSZwKCsNurcCz4VLQbE4Q63c3sxHtAo/Kjp9tSpwwGuceZY4j3Zlw?= =?us-ascii?Q?SSeAvppaKKTiy/9qV8GqdSySMsEkxrqZ8KAIgJDKya8RnbfhYdqKzgNa/p0c?= =?us-ascii?Q?ZDSCyiCeZu6OVgV2oockxxg2fpeMM4cdV5NP9XcxrxVIYZovDb2dylrLGYjW?= =?us-ascii?Q?/SMX04DgIMP8gJRR/WE3KGHUrHAjOfB8fuAhe4+N8iLFn1VE/SavcbNM2dLH?= =?us-ascii?Q?HXaXfOdX6hP8Bd1TUzEDPmBB+OMvzJtiWGBMiJfUZCmIpQJHphe+ykAYnFBU?= =?us-ascii?Q?2YWnVxtBytj+XcNxTTM0ZN9LQcy0TrB4ZY8T3NHCuuWPiL85HUvGgOxbokVf?= =?us-ascii?Q?zrbtaxApda4H0RoDC+wkGJELa+RLYlvBdGntVVxFUf7Ti4cXOIDz5uzXZkki?= =?us-ascii?Q?2v3StIZgWwfQvU7wWBxn/jPUrY6TqND0KWvnS6NA1q12+MSeHEsYgbPyIXn+?= =?us-ascii?Q?EiFkB/9+ndzug0+yd9o=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5347.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 050305f8-0d87-4fd7-c1a3-08da60c2b17c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2022 09:17:34.3855 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NM36dwQbEoj/UjkzkfgBC9Am2H65BqS62trLTus2JhlNQiEcZkIrSHEUvfMVUJnh X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6010 X-Mailman-Approved-At: Sun, 10 Jul 2022 08:34:14 +0200 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 inde= x >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 !=3D NULL) { >- if ((evvdp->evvd_vq_cidx > evvcp->evvc_vq_size) || >- (evvdp->evvd_vq_pidx > evvcp->evvc_vq_size)) { >- rc =3D EINVAL; >- goto fail3; >- } >- } >- > req.emr_cmd =3D MC_CMD_VIRTIO_INIT_QUEUE; > req.emr_in_buf =3D payload; > req.emr_in_length =3D MC_CMD_VIRTIO_INIT_QUEUE_REQ_LEN; @@ - >116,15 +108,13 @@ > > if (req.emr_rc !=3D 0) { > rc =3D req.emr_rc; >- goto fail4; >+ goto fail3; > } > > evvp->evv_vi_index =3D vi_index; > > return (0); > >-fail4: >- EFSYS_PROBE(fail4); > fail3: > EFSYS_PROBE(fail3); > fail2: >-- >1.8.3.1 Acked-by: Vijay Srivastava