From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49])
 by dpdk.org (Postfix) with ESMTP id 77F0F7F34
 for <dev@dpdk.org>; Wed, 29 Oct 2014 23:59:13 +0100 (CET)
Received: by mail-wg0-f49.google.com with SMTP id x13so2978937wgg.36
 for <dev@dpdk.org>; Wed, 29 Oct 2014 16:08:07 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=j2H/FMJdUgcgiqB5bZ/YA9jZhAm4pncc850X72dxsBQ=;
 b=GtemnztHpjoyoV07KRNyrxCxSruyr0zH0jamTLyij+8SoUDI5vnGCgVyCcPSCuLV1a
 THq/OPkIeR9F8J6b5aoM4qdt9OCYZzao7hgHHyOrXDbZDwXruHyiJ1FPjZVfnIU0tJhQ
 4JapWl0skD0CK+w5Uher2WOQN0qQxFuJrJlGiyfLgS8c23wLLXM/vawqoegoHA7xWnBs
 BLWZ2UsrK5ZOKjN+z+cLUpb0zPNdfySL/JAOp6pgKSkJZQvzy9wKtM89clZM4zlXTVW7
 /cHObb1dqKEzgL5O23jZ6fauKvJWbH4gl57YWFFp1JF/XiGe5uxTIl+tiSVOPVZLgcFf
 dYmw==
X-Gm-Message-State: ALoCoQl9P8PhutxggrYKF2O1qlZFdVWxxqEkJhpbeToR5oh4XeO3MRAdSsfc/hTOONny7w8DzCzy
X-Received: by 10.180.211.206 with SMTP id ne14mr40114161wic.79.1414624086968; 
 Wed, 29 Oct 2014 16:08:06 -0700 (PDT)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id bl9sm20223558wib.24.2014.10.29.16.08.05
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 29 Oct 2014 16:08:06 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Fu, JingguoX" <jingguox.fu@intel.com>
Date: Thu, 30 Oct 2014 00:07:47 +0100
Message-ID: <2857404.L6UlQ4hhUx@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; )
In-Reply-To: <6BD6202160B55B409D4232931158226256598C@SHSMSX101.ccr.corp.intel.com>
References: <1414564778-25056-1-git-send-email-changchun.ouyang@intel.com>
 <6BD6202160B55B409D4232931158226256598C@SHSMSX101.ccr.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Oct 2014 22:59:14 -0000

Please check with Yong Liu for the template of test report.
We discussed it together.
Thanks

2014-10-29 08:48, Fu, JingguoX:
> Sorry, not excepted, those are expected!
> 
> Patch name: 		librte_vhost: Fix compilation issue
> Brief description: 	to fix compilation error on ubuntu14.04 for vhost lib and example
> Test Flag: 			Tested-by
> Tester name: 		jingguox.fu@intel.com
> Commit ID:			1ab07743b21b785a71fa334641ab58e779532600
> Result summary:		total 3 cases, 3 passed, 0 failed
> 
> Test Case 1:		
> Name:				compile vhost on fc20 with gcc 4.8.3 x86_64 	
> Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
> 				GCC: gcc 4.8.3
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> expected:			compilation success
> Test result:		PASSED
> 
> Test Case 2:		
> Name:				compile vhost on fc20 with icc 14.0.2 x86_64 	
> Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
> 				ICC: icc 14.0.2
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> expected:			compilation success
> Test result:		PASSED
> 
> Test Case 3:		
> Name:				compile vhost on UB14.04 with gcc 4.8.2 x86_64 	
> Environment:		OS: Ubuntu14.04 3.13.0-24-generic x86_64
> 				GCC: gcc 4.8.2
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> expected:			compilation success
> Test result:		PASSED
> 
> -----Original Message-----
> From: Fu, JingguoX 
> Sent: Wednesday, October 29, 2014 16:17
> To: Ouyang, Changchun; dev@dpdk.org
> Cc: Cao, Waterman
> Subject: RE: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue
> 
> Patch name: 		librte_vhost: Fix compilation issue
> Brief description: 	to fix compilation error on ubuntu14.04 for vhost lib and example
> Test Flag: 			Tested-by
> Tester name: 		jingguox.fu@intel.com
> Commit ID:			1ab07743b21b785a71fa334641ab58e779532600
> Result summary:		total 3 cases, 3 passed, 0 failed
> 
> Test Case 1:		
> Name:				compile vhost on fc20 with gcc 4.8.3 x86_64 	
> Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
> 				GCC: gcc 4.8.3
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> Excepted:			compilation success
> Test result:		PASSED
> 
> Test Case 2:		
> Name:				compile vhost on fc20 with icc 14.0.2 x86_64 	
> Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
> 				ICC: icc 14.0.2
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> Excepted:			compilation success
> Test result:		PASSED
> 
> Test Case 3:		
> Name:				compile vhost on UB14.04 with gcc 4.8.2 x86_64 	
> Environment:		OS: Ubuntu14.04 3.13.0-24-generic x86_64
> 				GCC: gcc 4.8.2
> 				CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 				NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]
> Excepted:			compilation success
> Test result:		PASSED
> 
> 
> 
> 
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun
> Sent: Wednesday, October 29, 2014 14:40
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue
> 
> It fixes this compilation complain: "error: ignoring return value of 'realpath', 
> declared with attribute warn_unused_result [-Werror=unused-result]"
> 
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> ---
>  lib/librte_vhost/virtio-net.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
> index 27ba175..8015dd8 100644
> --- a/lib/librte_vhost/virtio-net.c
> +++ b/lib/librte_vhost/virtio-net.c
> @@ -133,6 +133,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem,
>  	char mapfile[PATH_MAX];
>  	char procdir[PATH_MAX];
>  	char resolved_path[PATH_MAX];
> +	char *path = NULL;
>  	FILE		*fmap;
>  	void		*map;
>  	uint8_t		found = 0;
> @@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem,
>  	while (NULL != (dptr = readdir(dp))) {
>  		snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s",
>  				pid, dptr->d_name);
> -	    realpath(memfile, resolved_path);
> -		if (resolved_path == NULL) {
> -			RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\n", dev->device_fh);
> +		path = realpath(memfile, resolved_path);
> +		if (path == NULL) {
> +			RTE_LOG(ERR, VHOST_CONFIG,
> +				"(%"PRIu64") Failed to resolve fd directory\n",
> +				dev->device_fh);
>  			closedir(dp);
>  			return -1;
>  		}
>