[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Dec 8 08:25:02 CET 2015


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


More information about the dev mailing list