From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 36C2E8E9B for ; Thu, 12 Nov 2015 07:39:27 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 11 Nov 2015 22:39:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,280,1444719600"; d="scan'208";a="835191565" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 11 Nov 2015 22:39:26 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Nov 2015 22:39:25 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 Nov 2015 22:39:25 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.83]) by shsmsx102.ccr.corp.intel.com ([169.254.2.42]) with mapi id 14.03.0248.002; Thu, 12 Nov 2015 14:39:22 +0800 From: "Xie, Huawei" To: "Tan, Jianfeng" , "dev@dpdk.org" Thread-Topic: [PATCH v2] vhost: fix mmap failure as len not aligned with hugepage size Thread-Index: AdEdFN1FMeYtd2pQRJuU1GnWYM0vlQ== Date: Thu, 12 Nov 2015 06:39:22 +0000 Message-ID: References: <1447279449-11289-1-git-send-email-jianfeng.tan@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 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 06:39:27 -0000 On 11/12/2015 1:04 PM, Tan, Jianfeng wrote:=0A= > This patch fixes a bug under lower version linux kernel, mmap()=0A= > fails when length is not aligned with hugepage size. mmap()=0A= > without flag of MAP_ANONYMOUS, should be called with length=0A= > argument aligned with hugepagesz at older longterm version=0A= > Linux, like 2.6.32 and 3.2.72, or mmap() will fail with EINVAL.=0A= > This bug was fixed in Linux kernel by commit:=0A= > dab2d3dc45ae7343216635d981d43637e1cb7d45=0A= > To avoid failure, make sure in caller to keep length aligned.=0A= >=0A= > Signed-off-by: Jianfeng Tan =0A= Acked-by: Huawei Xie =0A= =0A= Next time please add --in-reply-to with original message id.=0A= > ---=0A= > lib/librte_vhost/vhost_user/virtio-net-user.c | 36 ++++++++++++++++-----= ------=0A= > 1 file changed, 21 insertions(+), 15 deletions(-)=0A= >=0A=