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 F28DCA0C4D; Fri, 20 Aug 2021 17:53:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9389B4013F; Fri, 20 Aug 2021 17:53:59 +0200 (CEST) Received: from m13193.mail.163.com (m13193.mail.163.com [220.181.13.193]) by mails.dpdk.org (Postfix) with ESMTP id BCDFF4003E for ; Fri, 20 Aug 2021 17:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=e/aT/ Z8ELJYsIbZu1IlsqNfDStEULR2uVBeGGqcHzmM=; b=ld/yJvcN0WYhfumf9VEnE S2YOWHdxcnHnrcuTFlFhLpv3/L/KzBH/o4YTkFFbBuOXlP5aIxqwwem1AFLQhzx5 AFu5yN614iLV6N7P6YJCMtUJ8GoK2TrFKHpPVt7vuVNIMp5KAT7wCKymE4uUTI1x WxnxwHzNmUrgrDYbKJs//o= Received: from gaoxiangliu0$163.com ( [2409:8928:a68:1071:64d1:c809:8c39:632] ) by ajax-webmail-wmsvr193 (Coremail) ; Fri, 20 Aug 2021 23:53:45 +0800 (GMT+08:00) X-Originating-IP: [2409:8928:a68:1071:64d1:c809:8c39:632] Date: Fri, 20 Aug 2021 23:53:45 +0800 (GMT+08:00) From: "Gaoxiang Liu" To: "Xia, Chenbo" Cc: "maxime.coquelin@redhat.com" , "dev@dpdk.org" , "liugaoxiang@huawei.com" X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20210622(1d4788a8) Copyright (c) 2002-2021 www.mailtech.cn 163com In-Reply-To: References: <20210807231252.660-1-gaoxiangliu0@163.com> <20210813142248.88-1-gaoxiangliu0@163.com> MIME-Version: 1.0 Message-ID: <422dc823.b26a.17b6444a6fe.Coremail.gaoxiangliu0@163.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: wcGowADngB8L0B9hONzoAA--.52312W X-CM-SenderInfo: xjdr5xxdqjzxjxq6il2tof0z/1tbiQwr0Olc7VJ2EUAABs3 X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] vhost: fix crash on port deletion 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 Sender: "dev" SGkgQ2hlbmJvLAoKSSBhZGQgbW9yZSBkZXRhaWxlZCByZWFzb24gYXMgYmVsb3cgaW4gW1BBVENI ICB2NV0KVGhlIHJ0ZV92aG9zdF9kcml2ZXJfdW5yZWdpc3RlcigpIGFuZCB2aG9zdF91c2VyX3Jl YWRfY2IoKQpjYW4gYmUgY2FsbGVkIGF0IHRoZSBzYW1lIHRpbWUgYnkgMiB0aHJlYWRzLgp3aGVu IG1lbW9yeSBvZiB2c29ja2V0IGlzIGZyZWVkIGluIHJ0ZV92aG9zdF9kcml2ZXJfdW5yZWdpc3Rl cigpLAp0aGUgaW52YWxpZCBtZW1vcnkgb2YgdnNvY2tldCBpcyBhY2Nlc3NkIGluIHZob3N0X3Vz ZXJfcmVhZF9jYigpLgpJdCdzIGEgYnVnIG9mIGJvdGggbW9kZSBmb3Igdmhvc3QgYXMgc2VydmVy IG9yIGNsaWVudC4KCkVnIHZob3N0dXNlciBwb3J0IGlzIGNyZWF0ZWQgYXMgc2VydmVyLgpUaHJl YWQxIGNhbGxzIHJ0ZV92aG9zdF9kcml2ZXJfdW5yZWdpc3RlcigpLgpCZWZvcmUgdGhlIGxpc3Rl biBmZCBpcyBkZWxldGVkIGZyb20gcG9sbCB3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gIH0gZWxzZSBpZiAodnNvY2tldC0+cmVjb25uZWN0KSB7Cj4gKyAgICAgICAg ICAgICAgIHZob3N0X3VzZXJfcmVtb3ZlX3JlY29ubmVjdCh2c29ja2V0KTsKPiArICAgICAgICAg IH0KPiArCj4gICAgICAgICAgICBpZiAoIXN0cmNtcCh2c29ja2V0LT5wYXRoLCBwYXRoKSkgewo+ ICAgICAgICAgICAgICAgICBwdGhyZWFkX211dGV4X2xvY2soJnZzb2NrZXQtPmNvbm5fbXV0ZXgp Owo+ICAgICAgICAgICAgICAgICBmb3IgKGNvbm4gPSBUQUlMUV9GSVJTVCgmdnNvY2tldC0+Y29u bl9saXN0KTsKPiBAQCAtMTA1NiwyMSArMTA3MCw4IEBAIHJ0ZV92aG9zdF9kcml2ZXJfdW5yZWdp c3Rlcihjb25zdCBjaGFyICpwYXRoKQo+ICAgICAgICAgICAgICAgICBwdGhyZWFkX211dGV4X3Vu bG9jaygmdnNvY2tldC0+Y29ubl9tdXRleCk7Cj4KPiAgICAgICAgICAgICAgICAgaWYgKHZzb2Nr ZXQtPmlzX3NlcnZlcikgewo+IC0gICAgICAgICAgICAgICAgICAgIC8qCj4gLSAgICAgICAgICAg ICAgICAgICAgICogSWYgci93Y2IgaXMgZXhlY3V0aW5nLCByZWxlYXNlIHZob3N0X3VzZXIncwo+ IC0gICAgICAgICAgICAgICAgICAgICAqIG11dGV4IGxvY2ssIGFuZCB0cnkgYWdhaW4gc2luY2Ug dGhlIHIvd2NiCj4gLSAgICAgICAgICAgICAgICAgICAgICogbWF5IHVzZSB0aGUgbXV0ZXggbG9j ay4KPiAtICAgICAgICAgICAgICAgICAgICAgKi8KPiAtICAgICAgICAgICAgICAgICAgICBpZiAo ZmRzZXRfdHJ5X2RlbCgmdmhvc3RfdXNlci5mZHNldCwKPiAtICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdnNvY2tldC0+c29ja2V0X2ZkKSA9PSAtMSkgewo+IC0gICAgICAgICAgICAgICAg ICAgICAgICAgcHRocmVhZF9tdXRleF91bmxvY2soJnZob3N0X3VzZXIubXV0ZXgpOwo+IC0gICAg ICAgICAgICAgICAgICAgICAgICAgZ290byBhZ2FpbjsKPiAtICAgICAgICAgICAgICAgICAgICB9 Cj4gLQo+ICAgICAgICAgICAgICAgICAgICAgIGNsb3NlKHZzb2NrZXQtPnNvY2tldF9mZCk7Cj4g ICAgICAgICAgICAgICAgICAgICAgdW5saW5rKHBhdGgpOwo+IC0gICAgICAgICAgICAgICB9IGVs c2UgaWYgKHZzb2NrZXQtPnJlY29ubmVjdCkgewo+IC0gICAgICAgICAgICAgICAgICAgIHZob3N0 X3VzZXJfcmVtb3ZlX3JlY29ubmVjdCh2c29ja2V0KTsKPiAgICAgICAgICAgICAgICAgfQo+Cj4g ICAgICAgICAgICAgICAgIHB0aHJlYWRfbXV0ZXhfZGVzdHJveSgmdnNvY2tldC0+Y29ubl9tdXRl eCk7Cj4gLS0KPiAyLjMyLjAKCg==