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 E08D7A00C2 for ; Thu, 13 Oct 2022 11:41:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAA3F410F2; Thu, 13 Oct 2022 11:41:04 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 40C3440C35 for ; Thu, 13 Oct 2022 11:41:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665654062; x=1697190062; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lMLfI+Ohkbei1cdsbAJnlTcJ7rQq/x7lomlmvlmrZTk=; b=jJnJCbYvufKLVnWSTHHsZ1attcnMSmBjktRrf6L1mzsIigcrL31bphKb MASQLRpp/OamCMcogy0YmSPdZeIiZ7Q4EuqYh4P9XeKOu4vX/F/RCfOwe daoPXNudSl7kgRY8ZctNKtP+0OOuazl9DSe3eg3GtmgU6bMDR/PwB2FT8 wzuyoZ7CXAQfIchoT1D65VCXeDLfyAmQQspI9v9T3Ljz4NvygKLuDO8Fm 22DG2jFyvthVwIsfehCf0e+8Iufm5tvlGfMU0e+2NGBkohMpr/fc0dui2 pI3SVfoWnvkP2Clajzf9FFsUoxe2jM6gJuG4eR0XBa1LH5CcJcIyFvZrE w==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="367035993" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="367035993" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 02:41:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="578164651" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="578164651" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 13 Oct 2022 02:41:01 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 13 Oct 2022 02:41:01 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 13 Oct 2022 02:41:01 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.105) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 13 Oct 2022 02:41:00 -0700 Received: from PH7PR11MB6006.namprd11.prod.outlook.com (2603:10b6:510:1e1::13) by IA1PR11MB7344.namprd11.prod.outlook.com (2603:10b6:208:423::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Thu, 13 Oct 2022 09:40:51 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::849f:1c62:ac42:c04f]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::849f:1c62:ac42:c04f%7]) with mapi id 15.20.5709.019; Thu, 13 Oct 2022 09:40:51 +0000 From: "Ling, WeiX" To: "Jiang, Cheng1" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" CC: "dev@dpdk.org" , "Hu, Jiayu" , "Ding, Xuan" , "Ma, WenwuX" , "Wang, YuanX" , "Yang, YvonneX" , "He, Xingguang" , "Jiang, Cheng1" , "stable@dpdk.org" Subject: RE: [PATCH v2 2/2] vhost: fix slot index calculation in async vhost Thread-Topic: [PATCH v2 2/2] vhost: fix slot index calculation in async vhost Thread-Index: AQHY3SQMaF9ozaDlD0S8g46D6tbGVa4MFVcw Date: Thu, 13 Oct 2022 09:40:51 +0000 Message-ID: References: <20220822043126.19340-1-cheng1.jiang@intel.com> <20221011030803.16746-1-cheng1.jiang@intel.com> <20221011030803.16746-3-cheng1.jiang@intel.com> In-Reply-To: <20221011030803.16746-3-cheng1.jiang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB6006:EE_|IA1PR11MB7344:EE_ x-ms-office365-filtering-correlation-id: 792ec901-b720-467d-b082-08daacff042f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ibSIS0yOJwI2CLK6wpOhevD/j0W54JWAKWuIsN5Fx4/H+IhUzTZ48haPUFO7E0oYapdUedH5N6pGo1hEx+q12Y2vIQlaw1y0vBUQ/R9+JdUU4KQGCl9BuvQbWCLxS1V8QDrBHA7Iorx+GNlSC+rA4CDLbIGK4AyJThBZQFAma7G/kGlyMX19b5WhuRpn8rhvBjA6SQZKRjepV5Gtflo28slLzD8oE8n3f/U7mn1tDM4M4jmVLGdrAOSHN8e0eg1/QWoNU6lou8svcx1h7Na3X6Om5GQiU11rXAc7SVihW+CJHiuv3zFSAhNKLD/cAdj/Rnlpo2Ik06lzCG2lzUZVlBC6TuEy6AGYBcPQgF/EM6zHkGOjnQQshTDzfJFh2TnzQa/r1Ll+0a/hxN4REJFQkPi8A86bJuxpFa6NxnH410Tif8JqLdYzcR5odWOgD1f/OnW8nbODIPDnZaVfOcFm99csOsrm6988Er765L6Pc6oliJMBx4ep658NlaO77QYTsfSFVw52+vFgIT/urzcdcdt/fph18/k6sN4G83d6+HPdnrEH2LuButfT+b6YLOJV42SEUO9j/pcfYnFI5J2YXVQtsFhNBwH/ML2DuXVMWePB+2fwVp7eNtFEaXtxtrk0gmcr3prbY2BtokWovw3VJqYRJvjeKUHm4Ac5eYdWLmoeBM3DhGh5a1mGa0gKysoMSwVm9VqNnEHfJU+utJw1nNbjlO4OAS66lDQ9VmFqt/+Sn7S0El4R74xlYaWtIgSPMRhdpCGfL54o8Nhxex5Brg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6006.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(346002)(136003)(376002)(366004)(396003)(451199015)(4326008)(33656002)(66556008)(66446008)(86362001)(26005)(122000001)(38070700005)(38100700002)(186003)(2906002)(66946007)(83380400001)(54906003)(64756008)(7696005)(478600001)(110136005)(316002)(71200400001)(55016003)(66476007)(8936002)(82960400001)(4744005)(52536014)(8676002)(76116006)(6506007)(6636002)(5660300002)(9686003)(53546011)(41300700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?A+//4870/TU6nOBDahgB2KOTE4KCuAgQqK519IKuTYzlXufta+9O7ZZ/RnOl?= =?us-ascii?Q?BmqfX4ZbLFbudzEW27ZeZoAw4DC8a/g+em8fOVAnd9ed3hXmQDyHyF4NAmFF?= =?us-ascii?Q?4nhBpa2y+bbwCoi/DHAc/0K51q2mkdl5HxxYuNXksOTTYbkmfhV2PvmnAnbS?= =?us-ascii?Q?00mG92fW9SOS/QWKj3OsFaT5/wXr33VT5+KIBw3VJUsJlVeOmBOXw36AQryj?= =?us-ascii?Q?wTRaOPYKREpjeYad63qg98xjWOTc0Fg6YDAUDl4UZF9gvjiGyMZ1qOZM9u4y?= =?us-ascii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3DRJFT0hY5?= =?us-ascii?Q?Omgor/Xt7jFInduwJmRNKG4Zfkm6XigVf4K/PY1fQGlaI/MKrsDJe6MxVJg9?= =?us-ascii?Q?U6S3l9opUedY1tPRaw0FmWzNJvdNvjT+0m+/cMMS+X5QUnMCDaeawkHVU0Fh?= =?us-ascii?Q?cZJ8Pwl0AHcERw85jDlBhj+BD6ZMV1WVTeClALRQzr7K6ar6eJJcl2+ivjPv?= =?us-ascii?Q?j4x2u2/8lK57ZRajZ2j9YavINHl5Ckt25SS6LnooMib0z2lIzfIuwkvlrCZc?= =?us-ascii?Q?brDt8E0Nb4cq9XguUDXgdF4ZDHENlcPjdakmI9SXdkNzkmlQJb0gTt96CVBx?= =?us-ascii?Q?rknq1gpQkG4UEuMPNRZCzmQTgaPE5yC5gv6MWjVlEu7YpSFXfzAyayv75x/0?= =?us-ascii?Q?CXZ9jAuuD4od+4XGU+qIgNRsTi2UyvX7yIz41yvY?= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgOzqTfoSgFuxdnVICOp8KFiYesiA64M0iPXJEg+Wmr4ncrIMiyOD8wv3a5X5CjMylg2qzyApGI8V+9lskXr5a9z+kdHhArJmsBGbtt5MSLuIaKs2gqGqndpOBxgPvENV7ZXmF0llvU3Gh7Gr7Y2dWBC1nXodeC9i4EiKV7bf57Kg0nleLCt9Y/+oFCF6OV3C80VT1zx77jKAjcPMGgHobGRr7kBN2Sg0X3W7v+6wgGfjNHhLnEgAS/sqb8q6R0aKJgh3sbh0RjGpNHCqPOb2uDFFj2eOu/YFr+YVhmEPpLmhtP0KX7kZ5/xeGeVjOWaFoOnqc0mHXLxNxsnsj0xWQ== 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=6It2Gvh9vmaW84tQMgKzky4wlHrP7syKmNZu4VZg/jM=; b=a6EPtC3rUeIy7QTQRcQoo4Vccfkr/hemhxCwrQjITAPgDEQ/FEesnsdvTZQCr8jc+I9RY8SXb3QcNm7gn4EvCzn3cssZSvCMo6XRlgG2mf/Puse1wzH8EdL3nYP+ESQljXVE3/GUAeJmTdAwD4/Cc+qXuCl5WRopqPq6KbEyWGOFP6v5vYwVJvVMqHEos2/KvUfV6hnHaMZ1e9eG42UKUNk4wdn6i2x+jssWr5JdJaUxadJaJCzz/2TXt/Y3Y5v4OrvoNA0Qyl27zvYAwvJNcF2JnpiPMLS095tq0tIp4b46fwaxb5XlXsd87nutPs+k3NY1HYStjsfp24XmzZ7Xog== arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: PH7PR11MB6006.namprd11.prod.outlook.com x-ms-exchange-crosstenant-network-message-id: 792ec901-b720-467d-b082-08daacff042f x-ms-exchange-crosstenant-originalarrivaltime: 13 Oct 2022 09:40:51.2906 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: qBFhTHS4Zs48/DNac/LvPq/ILob+EgkHGHs6wmPBxLn/qx/G+Eyz3g+k4x1dBzljAglNdCXuBQl1Bekelaoq5Q== x-ms-exchange-transport-crosstenantheadersstamped: IA1PR11MB7344 x-originatororg: intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 > -----Original Message----- > From: Cheng Jiang > Sent: Tuesday, October 11, 2022 11:08 AM > To: maxime.coquelin@redhat.com; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan > ; Ma, WenwuX ; Wang, > YuanX ; Yang, YvonneX > ; He, Xingguang ; > Jiang, Cheng1 ; stable@dpdk.org > Subject: [PATCH v2 2/2] vhost: fix slot index calculation in async vhost > > When the packet receiving failure and the DMA ring full occur simultaneou= sly > in the asynchronous vhost, the slot_idx needs to be decreased by 1. For > packed virtqueue, the slot index should be ring_size - 1, if the slot_idx= is > currently 0, since the ring size is not necessarily the power of 2. > > Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring") > Fixes: fe8477ebbd94 ("vhost: support async packed ring dequeue") > Cc: stable@dpdk.org > > Signed-off-by: Cheng Jiang > --- Tested-by: Wei Ling