From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DD8FBA053C; Wed, 5 Feb 2020 06:08:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3687E1C1BA; Wed, 5 Feb 2020 06:08:27 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 04F8329CB for ; Wed, 5 Feb 2020 06:08:25 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2020 21:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,404,1574150400"; d="scan'208";a="225729175" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by fmsmga008.fm.intel.com with ESMTP; 04 Feb 2020 21:08:23 -0800 Date: Wed, 5 Feb 2020 13:08:15 +0800 From: Tiwei Bie To: Vitaliy Mysak Cc: Maxime Coquelin , Zhihong Wang , dev@dpdk.org Message-ID: <20200205050814.GA434648@___> References: <20200130080540.7616-1-vitaliy.mysak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200130080540.7616-1-vitaliy.mysak@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] rte_vhost: do not treat empty socket message as error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" [PATCH] rte_vhost: do not treat empty socket message as error s/rte_vhost:/vhost:/ On Thu, Jan 30, 2020 at 09:05:39AM +0100, Vitaliy Mysak wrote: > According to recvmsg() specification, 0 is a valid > return code when client is disconnecting. > Therefore, it should not be reported as error, unless there > are other dependencies that require message to not be empty. > But there are none, since the next immediate caller of recvmsg() > reports "vhost peer closed" info (not error) when message is empty. > > This patch changes return code check for recvmsg() so that > misleading error message is not printed when the code is 0. Fixes: 8f972312b8f4 ("vhost: support vhost-user") Cc: stable@dpdk.org > > Signed-off-by: Vitaliy Mysak > --- > lib/librte_vhost/socket.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Tiwei Bie Thanks, Tiwei