PMD_INIT_LOG(DEBUG, "vq->vq_ring_mem: 0x%"PRIx64"\n", (uint64_t)mz->phys_addr);
PMD_INIT_LOG(DEBUG, "vq->vq_ring_virt_mem: 0x%"PRIx64"\n", (uint64_t)mz->addr);
vq->virtio_net_hdr_mz = NULL;
- vq->virtio_net_hdr_mem = (void *)NULL;
+ vq->virtio_net_hdr_mem = 0;
if (queue_type == VTNET_TQ) {
/*
return -ENOMEM;
}
vq->virtio_net_hdr_mem =
- (void *)(uintptr_t)vq->virtio_net_hdr_mz->phys_addr;
+ vq->virtio_net_hdr_mz->phys_addr;
memset(vq->virtio_net_hdr_mz->addr, 0,
vq_size * sizeof(struct virtio_net_hdr));
} else if (queue_type == VTNET_CQ) {
return -ENOMEM;
}
vq->virtio_net_hdr_mem =
- (void *)(uintptr_t)vq->virtio_net_hdr_mz->phys_addr;
+ vq->virtio_net_hdr_mz->phys_addr;
memset(vq->virtio_net_hdr_mz->addr, 0, PAGE_SIZE);
}
*/
uint16_t vq_used_cons_idx;
uint16_t vq_avail_idx;
- void *virtio_net_hdr_mem; /**< hdr for each xmit packet */
+ phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
struct vq_desc_extra {
void *cookie;
dxp->ndescs = needed;
start_dp = txvq->vq_ring.desc;
- start_dp[idx].addr = (uint64_t)(uintptr_t)txvq->virtio_net_hdr_mem + idx * sizeof(struct virtio_net_hdr);
+ start_dp[idx].addr =
+ txvq->virtio_net_hdr_mem + idx * sizeof(struct virtio_net_hdr);
start_dp[idx].len = sizeof(struct virtio_net_hdr);
start_dp[idx].flags = VRING_DESC_F_NEXT;
idx = start_dp[idx].next;