From: Stephen Hemminger Date: Fri, 8 Feb 2019 03:44:01 +0000 (-0800) Subject: bus/vmbus: fix secondary process setup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fc20b5809dbc7ee8a341ec5db166de5a51d7118a;p=dpdk.git bus/vmbus: fix secondary process setup The secondary process doesn't correctly map the second and later resources because it doesn't change the offset. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c index 5ddd36ab62..46e233d9fa 100644 --- a/drivers/bus/vmbus/vmbus_common_uio.c +++ b/drivers/bus/vmbus/vmbus_common_uio.c @@ -47,9 +47,10 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev) for (i = 0; i != uio_res->nb_maps; i++) { void *mapaddr; + off_t offset = i * PAGE_SIZE; mapaddr = vmbus_map_resource(uio_res->maps[i].addr, - fd, 0, + fd, offset, uio_res->maps[i].size, 0); if (mapaddr == uio_res->maps[i].addr)