From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request Date: Tue, 8 Dec 2015 15:25:02 +0800 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 Cc: "dev@dpdk.org" , Victor Kaplansky , "Michael S. Tsirkin" To: "Xie, Huawei" 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) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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