tap: fix tap interface not working on Arm issue 98/22298/2
authorLijian.Zhang <[email protected]>
Wed, 21 Aug 2019 09:51:16 +0000 (17:51 +0800)
committerDamjan Marion <[email protected]>
Fri, 27 Sep 2019 07:15:38 +0000 (07:15 +0000)
commitc29681395ae2eff075f9c286ff5c6696a9df9453
tree0f7eeda9c211b3896ebd70b5c8201f387704a6f4
parent2160efbaf11b0675e30fc1f901e116f88c0302f5
tap: fix tap interface not working on Arm issue

The VPP code tries to set all userspace memory in the table via IOCTL
to VHOST_SET_MEM_TABLE. But on aarch64, the userspace address range is
larger (48 bits) than that on x86 (47 bits). Below is an segment from
/proc/[vpp]/maps.

fffb41200000-fffb43a00000 rw-s 00000000 00:0e 532232
/anon_hugepage (deleted)

Instead of setting all userspace memory space to vhost-net, will only set
the address space reserved by pmalloc module during initialization.

Type: fix

Change-Id: I91cb35e990869b42094cf2cd0512593733d33677
Signed-off-by: Lijian Zhang <[email protected]>
Reviewed-by: Steve Capper <[email protected]>
(cherry picked from commit ba0da570f264785f6b50eff7829f6653c0924069)
src/vlib/physmem.c
src/vlib/physmem.h
src/vnet/devices/tap/tap.c