From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 33E35FFA for ; Tue, 8 Dec 2015 08:24:06 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 07 Dec 2015 23:24:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,398,1444719600"; d="scan'208";a="702388777" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga003.jf.intel.com with ESMTP; 07 Dec 2015 23:24:03 -0800 Date: Tue, 8 Dec 2015 15:25:02 +0800 From: Yuanhan Liu To: "Xie, Huawei" Message-ID: <20151208072502.GK29571@yliu-dev.sh.intel.com> References: <1449027793-30975-1-git-send-email-yuanhan.liu@linux.intel.com> <1449027793-30975-2-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" , Victor Kaplansky , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request 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: Tue, 08 Dec 2015 07:24:06 -0000 On Tue, Dec 08, 2015 at 05:57:54AM +0000, Xie, Huawei wrote: > On 12/2/2015 11:40 AM, Yuanhan Liu wrote: > [...] > > + > > + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); > > + if (addr == MAP_FAILED) { > > + RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); > > + return -1; > > + } > Yuanhan: > mmap could fail with non-zero offset for huge page based mapping. Check > our workaround in user_set_mem_table. > I think you have done the validation, but i guess off is zero here. Yes, off is zero. And thanks for the remind; will fix it in next version. --yliu