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 EB9D2A0C45 for ; Tue, 20 Jul 2021 04:51:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA202410EE; Tue, 20 Jul 2021 04:51:24 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 739A84003F; Tue, 20 Jul 2021 04:51:22 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10050"; a="210887721" X-IronPort-AV: E=Sophos;i="5.84,254,1620716400"; d="scan'208";a="210887721" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 19:51:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,254,1620716400"; d="scan'208";a="500136235" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by FMSMGA003.fm.intel.com with ESMTP; 19 Jul 2021 19:51:21 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 19 Jul 2021 19:51:20 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2242.10 via Frontend Transport; Mon, 19 Jul 2021 19:51:20 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 19 Jul 2021 19:51:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HOqEyWFIJwaUSY5weOZ1eE0HXEtuD38fz98nF6jGYCPXDU+LsCFc5oDK2v+hScz7dGGKTq5vNylTn62aGZ9hVNSPs3sxoCxtPZ0enYizs2S/wQQvcSUGGqvX9PQFNpGlAjCMXze9DOkFGqGJCP0nHqy7UCZez6EBVL2gA/D9RdptqtQlbmtRyUuowG7YeSaMJVRQTLtxqkZnQaqCb6V3+EF209Qe2UVL/hJF1m71Xh3EiB++fNg9RjJAVyOdugr1K5koTJGmyS9d/i5axzMm5cNiTqEMJX+taE1OdIuMC3gjhLKJ5cl4rj+vX8nuhAGoZ0CBGcT11V7CGjFPbtvfyA== 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-SenderADCheck; bh=g8ZfCjTBoLEBdMwvzpjLHzy5gw9tBzlBpvjZ7dngZsY=; b=iNf3iMb0fRtjUt5TB24NfLaxDjB1kHw5DNTYzACcqWSZCTq5W+uTxMk+1Wd4FKY3XhjEBW8vGuBDBcjvSR9MjL5Wz+m+RP5RS8xoiTEWvA9/4MM+jyA3Gn+9dAmsqbLvbOznLrSBxmakEb0XLco1mS3S0UjBN9MMmdWqbeqjeXFCbj59E0nPBVDqMcjtD0mLrsfUuq7x+LY0pq6XJ+lZPfebGZo1Gk+cbXykojJvMrPUuXzYkFD+KWKooOgM8GvELtmKm3wqaj1Gf6zECDSy55pYwFwvMj6wNJ0i9qg/Ymmjq0psueq256fKB5qgvPCqabq0xSblNPXgzq6N54oDOQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g8ZfCjTBoLEBdMwvzpjLHzy5gw9tBzlBpvjZ7dngZsY=; b=ksvgz10+ipNveDZ2nVxybcQGecLtrV82anQYq4ZKtcaIYWR9Kiogg8Ry/BgArEZs2e89E8vSkMBcB9/UztLxs57D9ojn54cOtLV6fbXj1vp/HUN+iU+FlpEjf8ZOYLY/6JhN8/8OwSOgznJa/z0xhPOTXW2HAqJyi3G7uBJ5/hE= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.29; Tue, 20 Jul 2021 02:51:19 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::d447:3a7a:aad7:4d32]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::d447:3a7a:aad7:4d32%7]) with mapi id 15.20.4331.033; Tue, 20 Jul 2021 02:51:19 +0000 From: "Xia, Chenbo" To: Maxime Coquelin , "dev@dpdk.org" , "Jiang, Cheng1" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] vhost: fix assuming packed ring size is a power of 2 Thread-Index: AQHXcxsg+GUF5fVoGkutUQEfxVqYqKtLPVfA Date: Tue, 20 Jul 2021 02:51:18 +0000 Message-ID: References: <20210707103004.317886-1-maxime.coquelin@redhat.com> In-Reply-To: <20210707103004.317886-1-maxime.coquelin@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1605ac24-05a3-4876-c89b-08d94b29401b x-ms-traffictypediagnostic: MN2PR11MB4063: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 41wa8ucH6f84Xlnu9I2GJqYeNG8mnwN4XmyF+bdSasFLaL8LdGO+FfOsjKiSPRoNCWl98Ag5oJ9iknzchZsrx8mYG8U5Hwp2kA0BR3eKyUG3AFymoKRgDB4OPckCemNud3JBjxN1Mk1JI8fYEaUalKwYVqFRHY4CVI5SEBSW5A9aN8B2cgKkKzjQCYuSX7+fA6/0x+Cg+Vr6E4emc2VTQ3HRWAITaFnVwjSGYDWnL0PfwfkIWvCRkH4RZp2zRnVkTzMOZkS1bOgh1nSpWyuqqXLJpc70UJRLx0EtxgtyWPppz9RCXdIkmCWktZN4LrkAgSwlA519iA5BKMunR3BOQNOyL9wjOm011FSoqCUf1ywi0JVMelOoGNhH5JaMGsYwdr++IfddoYbCq44zFJgFLG4Pd7XA7e2NruM8AKN+U8dmyggnbvjEhQW5YC+6MpHIyhoRnRvLDcurgmXlzaLYBwDTOZLjASLo9Zy20l0KZe0Z/SgVY4Mh/WROQ2pg9w7D0csWZE8kaghFURz0RJUBOHmeqUgG28ziDIurv/3ahqcym+tYcZ3FtU+Pecr4+ZQs6sFgeGHmVlbxqzi54TYNnVoaUMvUuHUQLYUxqU09yGZxWKh0BpY7ALnpVukUNFfbi74rfApgaAYA1FQ7z0myb4SYguqHV7lV0d/9wzDzLtavXTC2Sf2KoUiCyeG1t0gHXdHmGQLHijCPNrtVVGyr8Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(76116006)(66446008)(64756008)(8676002)(26005)(6636002)(66556008)(66476007)(86362001)(66946007)(6506007)(110136005)(316002)(53546011)(5660300002)(8936002)(186003)(2906002)(83380400001)(7696005)(478600001)(38100700002)(122000001)(55016002)(9686003)(52536014)(33656002)(4326008)(71200400001)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?U3NYa1BWSi96T1BlbFM0Q2UwbmhmdG0zem1JVkR5MlZEbXFIRDJ2aHhwL3Fq?= =?utf-8?B?SlpFOEljZHRMeHAxWVRaWm1uSFU4WS9YVlRkdGxHOHBkbVRpS01vWk1zc05x?= =?utf-8?B?QzBMK2VJMDJBRTF5eERPYmtDckVvbGh6TzMrRGN6amcyWkRLbmVub2FrY2hD?= =?utf-8?B?MFVqLzVNcEhZK09qQW1wekQrQjdIQ3NjcDF0YXlJNVp4QVNKL0xua1EvVVF5?= =?utf-8?B?Q01yQzJuc0lRNm9leTRRUWpRd2ZzTEdqWU53MzJTM2lTOUhNTUxnNHdHQkxu?= =?utf-8?B?VUVuTjV4dURiajBUSTFoQXlrb2lKNENxZU5HeDRPWkR6bjFwT3ppczZqSUFF?= =?utf-8?B?ZG9yNHloSVUzYk1UcTlDVks1a0JMUEFDcXUwYzU5bFZKSmdFOVpLeVQrTlA3?= =?utf-8?B?WnBzck9PcEJGQ0hTMTNTNTd5ZW5BOWdNWm0vUDVtTDloNWhzNjlVSytsTzFx?= =?utf-8?B?Y0xUOEVFZlg1ekZoMWZqN1NoamxKU3JMMzN0bk1TZE43UHN0aFFYY1dZRFBx?= =?utf-8?B?NjI1QTJWWFEwN0h2V0NhK2ZQTTlMWEJWa3ZLR0kwK2FET29xYU1Ic0JEN0ho?= =?utf-8?B?amN6ZmJaNDlCenpmSE54K05keDFhYmhENWpoYU52Uy9XRkcvanJQRTdJWnEv?= =?utf-8?B?L1ZseXlINkdCMnJUMUtWZmpOdnRNSlF5NklBMkJNWmFYMWNaQnF2ckF1eU83?= =?utf-8?B?bmJ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0N1hj?= =?utf-8?B?NEdjZGRmSllENkdGc3NDVHRMYXdORFBKd3NsWG5lTWdNSmF0US9PWXl3Zk5x?= =?utf-8?B?dE1uUFl5ME9nRHkwMEZvdXdYQkE0RThuS2RCNFQzdXRZbHRzajlPbHJhWU1W?= =?utf-8?Q?Wgpyd3VJ+/Fg0Gt80k=3D?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1605ac24-05a3-4876-c89b-08d94b29401b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2021 02:51:18.9701 (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: Z5CImLUba7BdjLHJFk/+8Lw1W/8FCK6zr7usOSef7loqKGFasrSDuzwbEsxCVTW4yDaAQmepwbGF/OSmAXHuOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4063 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v2] vhost: fix assuming packed ring size is a power of 2 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 Sender: "stable" PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBNYXhpbWUgQ29xdWVsaW4gPG1h eGltZS5jb3F1ZWxpbkByZWRoYXQuY29tPg0KPiBTZW50OiBXZWRuZXNkYXksIEp1bHkgNywgMjAy MSA2OjMwIFBNDQo+IFRvOiBkZXZAZHBkay5vcmc7IEppYW5nLC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