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 798A4A0548; Thu, 2 Jun 2022 10:32:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2728F40694; Thu, 2 Jun 2022 10:32:22 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B315B4021E for ; Thu, 2 Jun 2022 10:32:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654158740; x=1685694740; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=pyRcVGIGCkmXvxkrgNq80PiiarzReF5uCFjzqwBMal8=; b=YST5GJ96fIDRLd3K+K9i1p3sWLcQ+Yex+JPODcx9kU4QHF7IDs99OOhl HlHlJgKuxlip+nSk7R5tvvxWf9ARQD8Ru1eViAhrs2CebPr4/a24SlEru bb5g6qKbi5fnwOoWJlRWPSh3XecfmfOB9SazCMb5pWyEEH/BuT2BGW0D+ ZJVdhlxTANWndM2J5Bg9QuhSSybDGLSgoZcqwXQRyn2lGdd82/8p91Wmp C2Xx1bUQz383tgS0/DH9lH4ScW9l1Q4tS48GNXaou3wbNHbKnq68XgPbm sg5v/Vi2xnIgEZbJR3U1sI/wVqfLyoQuE0+nKRqIjr2OsMKjvT471BsCq w==; X-IronPort-AV: E=McAfee;i="6400,9594,10365"; a="338923829" X-IronPort-AV: E=Sophos;i="5.91,270,1647327600"; d="scan'208";a="338923829" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 01:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,270,1647327600"; d="scan'208";a="633946945" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga008.fm.intel.com with ESMTP; 02 Jun 2022 01:32:18 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.2308.27; Thu, 2 Jun 2022 01:32:18 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 2 Jun 2022 01:32:17 -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.2308.27 via Frontend Transport; Thu, 2 Jun 2022 01:32:17 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) 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.2308.27; Thu, 2 Jun 2022 01:32:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c79jZJw+U53ASjp2LlVoaJv7RmtK2G8BSjI2SHeIweseA4IYfBE2Ld61Uld9pHRf2x917A1Wjn76sSHuYSgEvkMQXtqpv+ir+DveEkUzfxhUCYYCgvLis6atPbahW84cKIKHnJYEBNrL/s6/0U0raTDYR31ZXmjgwJtHr1bxjI+Gu8f0sbpoEweaIbwjX8Tt/ieEGx18ADSLbgV33+C1yMERMxr7t9naCOq4cBTKY1j1R9c8ybpZqbuorImaNSGQHy3TnXoHpocQQrnwJjIoj0l6/h0f3xel6EDzc9Ysf/8op4+cDf35G34xX+5YGlwJ2CgSm5TsYLzIqRDlsjGSWg== 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=pyRcVGIGCkmXvxkrgNq80PiiarzReF5uCFjzqwBMal8=; b=cYVxd1m5tUbroksgihno2YaBXnpohLyhoRLFZW/UaOoX3JMUyOcnad64Y/9nlRC/gOcTNzwY9GIh393Nh00fUNfC/ZjUIg3oy5r72jqhfA9IcWQYgdtNKWDbvUpvEMiWQ6i1ihEc204de9QWPgnzQGBTsk3v490J++GZLqZg0YnYSBooqlIfrbWsFNoY+75jwnRusOjCzE3jxLxgKDdAdRu5ojnwTPQ6FT9852KyC73cW24tR3Nyn2kPTu4OA5exTLqUuol80Zo0/aEIPjvAllZQvp4D90q96tjiW6V3TTYdpsIUluiYl4p5903pD+Eby42NqZ0n6oFAUP06G2PcpA== 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 Received: from PH7PR11MB6006.namprd11.prod.outlook.com (2603:10b6:510:1e1::13) by BL0PR11MB3268.namprd11.prod.outlook.com (2603:10b6:208:67::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Thu, 2 Jun 2022 08:32:15 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::4133:3126:8dc4:88e3]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::4133:3126:8dc4:88e3%8]) with mapi id 15.20.5314.013; Thu, 2 Jun 2022 08:32:14 +0000 From: "Ling, WeiX" To: "Wang, YuanX" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "dev@dpdk.org" CC: "Hu, Jiayu" , "He, Xingguang" , "Wang, YuanX" , "stable@dpdk.org" Subject: RE: [PATCH] net/vhost: add flag to control wait queuing Thread-Topic: [PATCH] net/vhost: add flag to control wait queuing Thread-Index: AQHYdYIDdqEpnDdNU0+InszvvAMW1K07y2KA Date: Thu, 2 Jun 2022 08:32:14 +0000 Message-ID: References: <20220601142541.605301-1-yuanx.wang@intel.com> In-Reply-To: <20220601142541.605301-1-yuanx.wang@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-office365-filtering-correlation-id: d2ff30e1-3407-4ccf-8752-08da447265af x-ms-traffictypediagnostic: BL0PR11MB3268:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RPOvJZ4QEYEcezwxkq73v5rCnMC/lLYl43Qs/dA5DF8IoBMX01xRVERPD4HRoXBRxNlGoPRWxxscjPNrMf5EaAay5FdBuzRVGFXUmYD5+aCbubqJ7GFP7r3fsjvmfJ5E4jHFboUCjywBGTRUisVlQsOS7XxAYhdvu3SbesFFsDZblFvF+RHi3aKqZK+rLGwLtiRq8bAKK7ZWXFfDM+IJCq/2LeGXK0hQkKVecx5wyBra03Cza6mb88bhZdC5UOI5dNQ4FDJloLuQ1E8LrpCDTEJ+ZMSQmaczKDqpCttanrgpFiNt/heN4c0FeFN4jk39wWtD5sP3ZUg4gzAZNKUDducqgYWn/R6rpxxE+JvmyukAsCwlud+wAvUStbDmyZCcR7dVnKtp0dbElkUAiwgtYDAtNn25vE2qX7XTycQG6+0H/uA+n6RmgaFQMiEUM5Kgjy7wvd7wFg5thMw+5KYDqhxf/xPL79Gm16eDwdo63ZRS2aAJQpQJyff1o3PcV8PxmejjCeo74CNSTBdp0+T9Zi71k/LLuw1D+pI/a8slhh8nHqWIGL6d9QY98Qg1T0qFhQ4RBUK0o5Rd/liBC8PYi+Ke1jg12kgl97fKYBDLJbY04wNhRO/tm1xhPAGmfY4UK6Ix5uwY0Dr9JfrJ6nraS8VqgXdig5cVLHPY0B8v+5N1plvHgRlY2+YrXqownCD7I7Du8OIPDN6O7vzAR2Os1w== 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:(13230001)(366004)(7696005)(53546011)(6506007)(26005)(82960400001)(186003)(64756008)(66446008)(76116006)(66476007)(66556008)(66946007)(8676002)(4326008)(9686003)(86362001)(54906003)(71200400001)(110136005)(508600001)(55016003)(316002)(33656002)(4744005)(38100700002)(2906002)(83380400001)(52536014)(8936002)(38070700005)(5660300002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tUeRuLOjRuMwuA4cdqn2oHz8xSRFNChlDiR3E2JhkJPTWkpHGyFSXWDB/Df2?= =?us-ascii?Q?Xiv/QxXUpXjGYMovMb9KgSHHrXwBIGA21ocySxRjp2jL/Zjnm/+NmnIpuqTA?= =?us-ascii?Q?nqfxxRmy0+KqVzgqtv3JgN/PQGUjQEY+8yW6UYwBnyaWKAQYVpYhnsotUFlG?= =?us-ascii?Q?/WPm5K6TEdyrfyWK8SojZRK79iTqLxfx51pITQ4xHFfJlqNI2IIFZnCtVdAp?= =?us-ascii?Q?9NbB2pbcGuFWjvR/A4fJF9WJOTgNUEHn7/NSyU6TNKYK1dSwmHki4fOLrdR3?= =?us-ascii?Q?WkZBkDkZq/O7OvTri30DBL7C3I7WqlGrQH/STq0Io0cOWzEiw/EhhMVmT9vI?= =?us-ascii?Q?LOjjFcTTFb5MMJKB8JHU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iDs1KlUZ6lb8p9fA?= =?us-ascii?Q?J9BPYWRJPQ55KP72L8E7uFRX/yKBJZGOeJ1B6kWpXGpIh7/MMRtgeqlU50Kw?= =?us-ascii?Q?1QC2ZV5ZBFeYGuXphJGX846O09PmO3rY6+fZzimZl0h5hI9U3LyTLi7ERcFP?= =?us-ascii?Q?+aV1TYkB/KvIw3HFmbf5F2sJzzP5Ut9yxTRJ7f8Axdxmz7D9IQvbPljLu3WN?= =?us-ascii?Q?747JUdlzI4NsI/YOJaE+NYAxzZgRDwjcxMSccQw7GRL672GRhY4fu9bBAObW?= =?us-ascii?Q?/yMp9YI8M0caIcwLx6qfRoeTI+2QdvEabNpi0CQ6G24L72a5jCjS0UtE4K84?= =?us-ascii?Q?ArpHKCGqEFTp1OZAsU/qgoFoVzJ0UImnZBLvJ98hlFw2kRmgdGdUx3Z8wxUw?= =?us-ascii?Q?etAHca0cXH8QdQwOh3s07ryBYlgYwYO15BonQBGNVw2oQAiFcJdSor1+6pRS?= =?us-ascii?Q?FLfg3tNY1yV0QxOdE82NN9CnKwy+HSX+7v3eQ4m0psJ44TIaPHUD9NajSzNj?= =?us-ascii?Q?ys9MGqqNsQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6006.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2ff30e1-3407-4ccf-8752-08da447265af X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2022 08:32:14.8901 (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: k3ZaV53iJA7iFjEdXgH0lIR+Uq2/xnSlPWPOYgrV1/4M1aUUEJZjoDWZH+LsTZPbDDpF9y86Gh7UfPkIZ04cSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3268 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Yuan Wang > Sent: Wednesday, June 1, 2022 10:26 PM > To: maxime.coquelin@redhat.com; Xia, Chenbo ; > dev@dpdk.org > Cc: Hu, Jiayu ; He, Xingguang > ; Wang, YuanX ; > stable@dpdk.org > Subject: [PATCH] net/vhost: add flag to control wait queuing >=20 > update_queuing_status prevents PMD queue operations from affecting the > data plane by waiting for rx/tx_pkt_burst to stops accessing the vhost de= vice. > In fact, it is only necessary to wait when destroy/stop the device, new/s= tart > device and vring_state_changed cases do not need. >=20 > Since vring is locked when vring state changes, unconditional waiting may > also cause deadlocks. >=20 > To avoid deadlocks and unnecessary waiting, this patch adds a flag to con= trol > whether waiting is required. >=20 > Fixes: 9dc6bb0682 (net/vhost: fix access to freed memory) > Fixes: 1ce3c7fe14 (net/vhost: emulate device start/stop behavior) > Cc: stable@dpdk.org >=20 > Signed-off-by: Yuan Wang > --- Tested-by: Wei Ling