From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jingguox.fu@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 177EA801E
 for <dev@dpdk.org>; Wed, 29 Oct 2014 09:42:23 +0100 (CET)
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga101.fm.intel.com with ESMTP; 29 Oct 2014 01:51:10 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.04,808,1406617200"; d="scan'208";a="613295512"
Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78])
 by fmsmga001.fm.intel.com with ESMTP; 29 Oct 2014 01:51:09 -0700
Received: from kmsmsx153.gar.corp.intel.com (172.21.73.88) by
 PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Wed, 29 Oct 2014 16:48:42 +0800
Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by
 KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Wed, 29 Oct 2014 16:48:41 +0800
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.202]) by
 SHSMSX103.ccr.corp.intel.com ([169.254.4.207]) with mapi id 14.03.0195.001;
 Wed, 29 Oct 2014 16:48:36 +0800
From: "Fu, JingguoX" <jingguox.fu@intel.com>
To: "Fu, JingguoX" <jingguox.fu@intel.com>, "Ouyang, Changchun"
 <changchun.ouyang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue
Thread-Index: AQHP80M7Kh8PTMKBhkalxzhIyXPd95xGr7fAgAATfQA=
Date: Wed, 29 Oct 2014 08:48:36 +0000
Message-ID: <6BD6202160B55B409D4232931158226256598C@SHSMSX101.ccr.corp.intel.com>
References: <1414564778-25056-1-git-send-email-changchun.ouyang@intel.com> 
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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 08:42:25 -0000

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 a=
nd 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:	=09
Name:				compile vhost on fc20 with gcc 4.8.3 x86_64 =09
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:	=09
Name:				compile vhost on fc20 with icc 14.0.2 x86_64 =09
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:	=09
Name:				compile vhost on UB14.04 with gcc 4.8.2 x86_64 =09
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=20
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 a=
nd 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:	=09
Name:				compile vhost on fc20 with gcc 4.8.3 x86_64 =09
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:	=09
Name:				compile vhost on fc20 with icc 14.0.2 x86_64 =09
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:	=09
Name:				compile vhost on UB14.04 with gcc 4.8.2 x86_64 =09
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 'realp=
ath',=20
declared with attribute warn_unused_result [-Werror=3Dunused-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_m=
emory *mem,
 	char mapfile[PATH_MAX];
 	char procdir[PATH_MAX];
 	char resolved_path[PATH_MAX];
+	char *path =3D NULL;
 	FILE		*fmap;
 	void		*map;
 	uint8_t		found =3D 0;
@@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_=
memory *mem,
 	while (NULL !=3D (dptr =3D readdir(dp))) {
 		snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s",
 				pid, dptr->d_name);
-	    realpath(memfile, resolved_path);
-		if (resolved_path =3D=3D NULL) {
-			RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\=
n", dev->device_fh);
+		path =3D realpath(memfile, resolved_path);
+		if (path =3D=3D NULL) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"(%"PRIu64") Failed to resolve fd directory\n",
+				dev->device_fh);
 			closedir(dp);
 			return -1;
 		}
--=20
1.8.4.2