From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 098D24E4CA; Wed, 24 Aug 2016 08:04:58 +0000 (UTC) Received: from [10.36.7.65] (vpn1-7-65.ams2.redhat.com [10.36.7.65]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7O84uBO014040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Aug 2016 04:04:57 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1471510123-4984-1-git-send-email-yuanhan.liu@linux.intel.com> <1471510123-4984-7-git-send-email-yuanhan.liu@linux.intel.com> From: Maxime Coquelin Message-ID: <41de85be-3a79-6fd5-4d61-dac890f7c87b@redhat.com> Date: Wed, 24 Aug 2016 10:04:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471510123-4984-7-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 24 Aug 2016 08:04:58 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 6/7] vhost: get device once X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 08:04:58 -0000 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