aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorLee Roberts <lee.roberts@hpe.com>2018-03-07 19:47:00 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-09 19:43:48 +0000
commit45a09462ad4f64251d1302fb6fdca5cfef1d2f24 (patch)
tree6b8f41350025e194fc7591607cfc7c2091bfe1f7 /src/vlib
parent0d2b0d5497b61afb5c964373c7bed974d78762a0 (diff)
Correct address calculation for VPP-1168
Use (u64) cast to ensure proper address calculations. Change-Id: I6bad50010b140189f1b0af177e55da0045bd7a93 Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/linux/physmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c
index 1a449921857..b247efc9a85 100644
--- a/src/vlib/linux/physmem.c
+++ b/src/vlib/linux/physmem.c
@@ -163,7 +163,7 @@ unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size,
for (i = 0; i < pr->n_pages; i++)
{
- void *ptr = pr->mem + (i << pr->log2_page_size);
+ void *ptr = pr->mem + ((u64) i << pr->log2_page_size);
int node;
if ((move_pages (0, 1, &ptr, 0, &node, 0) == 0) && (numa_node != node))
{