From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 509B2A0096 for ; Tue, 9 Apr 2019 16:26:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0E154F9C; Tue, 9 Apr 2019 16:26:10 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8120A4CA7; Tue, 9 Apr 2019 16:26:06 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A40DC81226; Tue, 9 Apr 2019 14:26:05 +0000 (UTC) Received: from localhost (unknown [10.36.118.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDF7F6015A; Tue, 9 Apr 2019 14:25:54 +0000 (UTC) Date: Tue, 9 Apr 2019 16:25:53 +0200 From: Jens Freimann To: Ilya Maximets Cc: dev@dpdk.org, Maxime Coquelin , Tiwei Bie , Dariusz Stojaczyk , David Marchand , stable@dpdk.org Message-ID: <20190409142553.w3hisc5qklgr5pkj@jenstp.localdomain> References: <20190409133622.14729-1-i.maximets@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190409133622.14729-1-i.maximets@samsung.com> User-Agent: NeoMutt/20180716-1376-5d6ed1 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 09 Apr 2019 14:26:05 +0000 (UTC) Subject: Re: [dpdk-stable] [PATCH] vhost: fix passing destroyed device to destroy callback X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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" On Tue, Apr 09, 2019 at 04:36:22PM +0300, Ilya Maximets wrote: >Application should be able to obtain information like 'ifname' from >the 'vid' passed to 'destroy_connection' callback. Currently, all the >API calls with passed 'vid' fails with 'device not found'. > >Fixes: efba12a78ddf ("vhost: add user callbacks for socket open/close") >Cc: stable@dpdk.org > >Signed-off-by: Ilya Maximets >--- > lib/librte_vhost/socket.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Because the device is destroyed before the callback is done, vid is not a valid index to look up device information any more. So, yes we should destroy the device after the callback. Reviewed-by: Jens Freimann regards, Jens