From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DEC8891B6 for ; Thu, 12 Nov 2015 13:51:47 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 12 Nov 2015 04:51:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,281,1444719600"; d="scan'208";a="848864058" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2015 04:51:46 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 12 Nov 2015 04:51:46 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 12 Nov 2015 04:51:46 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.193]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.138]) with mapi id 14.03.0248.002; Thu, 12 Nov 2015 20:51:44 +0800 From: "Tan, Jianfeng" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2] vhost: fix mmap failure as len not aligned with hugepage size Thread-Index: AQHRHQektlSEo5AkaU6K3Gh3AqQw5Z6Xt6eAgACfusA= Date: Thu, 12 Nov 2015 12:51:43 +0000 Message-ID: References: <1447279449-11289-1-git-send-email-jianfeng.tan@intel.com> <18810031.JvBkFVb3yD@xps13> In-Reply-To: <18810031.JvBkFVb3yD@xps13> 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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] vhost: fix mmap failure as len not aligned with hugepage size 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: Thu, 12 Nov 2015 12:51:48 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, November 12, 2015 7:19 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] vhost: fix mmap failure as len not ali= gned > with hugepage size >=20 > 2015-11-12 06:04, Jianfeng Tan: > > - alignment =3D region[idx].blksz; > > - munmap((void *)(uintptr_t) > > - RTE_ALIGN_FLOOR( > > - region[idx].mapped_address, > alignment), > > - RTE_ALIGN_CEIL( > > - region[idx].mapped_size, > alignment)); > > + munmap((void *)region[idx].mapped_address, > > + region[idx].mapped_size); >=20 > Sorry, it does not compile for 32-bit: > virtio-net-user.c:84:11: error: cast to pointer from integer of different= size Oops, sorry, should use (void *)(uintptr_t). I'll resend this patch. Jianfeng