diff options
author | Christophe Fontaine <christophe.fontaine@qosmos.com> | 2016-05-11 08:36:24 +0000 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-05-17 19:24:17 +0000 |
commit | 95c8415531a27745c367fe2b352a4bdf2b1c7965 (patch) | |
tree | cfdebfd11f3f065e5f90fe3414c6c5c102622da1 /vnet/vnet/devices/dpdk/vhost_user.c | |
parent | 144a90f2e1e60e9c194c61c25db406e6e5f542e9 (diff) |
dpdk/build - 32bits compilation
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of
merging them into 1 u64.
Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
Diffstat (limited to 'vnet/vnet/devices/dpdk/vhost_user.c')
-rw-r--r-- | vnet/vnet/devices/dpdk/vhost_user.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index c82b37f9927..9bf76741588 100644 --- a/vnet/vnet/devices/dpdk/vhost_user.c +++ b/vnet/vnet/devices/dpdk/vhost_user.c @@ -106,11 +106,11 @@ static int dpdk_vhost_user_set_vring_enable(u32 hw_if_index, */ -static uint64_t -qva_to_vva(struct virtio_net *dev, uint64_t qemu_va) +static uword +qva_to_vva(struct virtio_net *dev, uword qemu_va) { struct virtio_memory_regions *region; - uint64_t vhost_va = 0; + uword vhost_va = 0; uint32_t regionidx = 0; /* Find the region where the address lives. */ @@ -176,7 +176,7 @@ static void disable_interface(dpdk_device_t * xd) xd->vu_is_running = 0; } -static inline void * map_guest_mem(dpdk_device_t * xd, u64 addr) +static inline void * map_guest_mem(dpdk_device_t * xd, uword addr) { dpdk_vu_intf_t * vui = xd->vu_intf; struct virtio_memory * mem = xd->vu_vhost_dev.mem; @@ -184,7 +184,7 @@ static inline void * map_guest_mem(dpdk_device_t * xd, u64 addr) for (i=0; i<mem->nregions; i++) { if ((mem->regions[i].guest_phys_address <= addr) && ((mem->regions[i].guest_phys_address + mem->regions[i].memory_size) > addr)) { - return (void *) (vui->region_addr[i] + addr - mem->regions[i].guest_phys_address); + return (void *) ((uword)vui->region_addr[i] + addr - (uword)mem->regions[i].guest_phys_address); } } DBG_SOCK("failed to map guest mem addr %lx", addr); @@ -563,8 +563,8 @@ dpdk_vhost_user_set_vring_num(u32 hw_if_index, u8 idx, u32 num) } static clib_error_t * -dpdk_vhost_user_set_vring_addr(u32 hw_if_index, u8 idx, u64 desc, \ - u64 used, u64 avail, u64 log) +dpdk_vhost_user_set_vring_addr(u32 hw_if_index, u8 idx, uword desc, \ + uword used, uword avail, uword log) { dpdk_device_t * xd; struct vhost_virtqueue *vq; @@ -1190,7 +1190,7 @@ static clib_error_t * dpdk_vhost_user_socket_read (unix_file_t * uf) goto close_socket; } - xd->vu_vhost_dev.log_base += (u64)addr + msg.log.offset; + xd->vu_vhost_dev.log_base += pointer_to_uword(addr) + msg.log.offset; xd->vu_vhost_dev.log_size = msg.log.size; msg.flags |= VHOST_USER_REPLY_MASK; msg.size = sizeof(msg.u64); @@ -1898,7 +1898,7 @@ show_dpdk_vhost_user_command_fn (vlib_main_t * vm, vq->desc[j].len, vq->desc[j].flags, vq->desc[j].next, - (u64) map_guest_mem(xd, vq->desc[j].addr));} + pointer_to_uword(map_guest_mem(xd, vq->desc[j].addr)));} } } vlib_cli_output (vm, "\n"); |