From: Maxime Coquelin Subject: Re: [PATCH 6/7] vhost: get device once Date: Wed, 24 Aug 2016 10:04:55 +0200 Message-ID: <41de85be-3a79-6fd5-4d61-dac890f7c87b@redhat.com> References: <1471510123-4984-1-git-send-email-yuanhan.liu@linux.intel.com> <1471510123-4984-7-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: Yuanhan Liu , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 807192B82 for ; Wed, 24 Aug 2016 10:04:58 +0200 (CEST) In-Reply-To: <1471510123-4984-7-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 08/18/2016 10:48 AM, Yuanhan Liu wrote: > Invoke get_device() at the beginning of vhost_user_msg_handler, so that > we could check the return value once. Which could save tons of duplicate > get-and-check device. > > Signed-off-by: Yuanhan Liu > --- > lib/librte_vhost/vhost_user.c | 160 +++++++++++++----------------------------- > 1 file changed, 47 insertions(+), 113 deletions(-) Makes sense: Reviewed-by: Maxime Coquelin Thanks, Maxime