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 DB46EA0032; Wed, 11 May 2022 03:52:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 821A6410EE; Wed, 11 May 2022 03:52:03 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id A542E406B4 for ; Wed, 11 May 2022 03:52:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652233921; x=1683769921; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=dUkQYaEJsOyjv9G9DSwhj2wbpwDMOjBrEi1h4P/nJ1A=; b=mF5N2laE+y21cQX1FACj8yBjRAQal3B2jwXsDoSdypmxFmUtly6etwT0 fsAaLM2kugy+aJAREXk/DLsWU15YoKwfIKcvsMrIYely0tthkZG1ULTPZ I7wTOHgNjzKBelwa4rtz/4/1rLrglMB3CVabxAmMmtLJ9mdO/f7Yv0qFo lgiWGpfSU7wnFooH69VBzCicD2CqIoqa5xKbvAW8NTHbCvqHdSwZY0drl QywAvyts8QAVRmoopnY1J3anPSZVYGLMUw6dqQNfW0s4zxLlrDWIubVSa 47OQyZQ3mQ/4phSFFYjRsR5tWA2Qz6rEH61+BRMcN4dXbAfSwFtHL70/K w==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="257093810" X-IronPort-AV: E=Sophos;i="5.91,215,1647327600"; d="scan'208";a="257093810" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 18:51:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,215,1647327600"; d="scan'208";a="553100300" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 10 May 2022 18:51:59 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 10 May 2022 18:51:58 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 10 May 2022 18:51:58 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2308.027; Tue, 10 May 2022 18:51:58 -0700 From: "Hu, Jiayu" To: Maxime Coquelin , "dev@dpdk.org" , "Xia, Chenbo" , "Ding, Xuan" , "Jiang, Cheng1" , "Pai G, Sunil" , "david.marchand@redhat.com" Subject: RE: [PATCH] vhost: add runtime locking check in unsafe APIs Thread-Topic: [PATCH] vhost: add runtime locking check in unsafe APIs Thread-Index: AQHYZEeH0aIO9XGqwEqYKNoeeJ75M60XydyggAB/gICAAKCyMA== Date: Wed, 11 May 2022 01:51:58 +0000 Message-ID: References: <20220510082528.1229104-1-maxime.coquelin@redhat.com> <0003ad4c95bc4057938a9979efce4889@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 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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