{
int cpu = dm->input_cpu_first_index + (next_cpu % dm->input_cpu_count);
- unsigned lcore = vlib_worker_threads[cpu].dpdk_lcore_id;
+ unsigned lcore = vlib_worker_threads[cpu].lcore_id;
vec_validate (xd->cpu_socket_id_by_queue, q);
xd->cpu_socket_id_by_queue[q] = rte_lcore_to_socket_id (lcore);
return 0;
}
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
static long
get_huge_page_size (int fd)
{
fstatfs (fd, &s);
return s.f_bsize;
}
-#endif
static clib_error_t *
dpdk_vhost_user_set_protocol_features (u32 hw_if_index, u64 prot_features)
{
*features = rte_vhost_feature_get ();
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
#define OFFLOAD_FEATURES ((1ULL << VIRTIO_NET_F_HOST_TSO4) | \
(1ULL << VIRTIO_NET_F_HOST_TSO6) | \
(1ULL << VIRTIO_NET_F_CSUM) | \
* not support offloading breaks L4 traffic.
*/
*features &= (~OFFLOAD_FEATURES);
-#endif
DBG_SOCK ("supported features: 0x%lx", *features);
return 0;
vq->desc = (struct vring_desc *) qva_to_vva (&xd->vu_vhost_dev, desc);
vq->used = (struct vring_used *) qva_to_vva (&xd->vu_vhost_dev, used);
vq->avail = (struct vring_avail *) qva_to_vva (&xd->vu_vhost_dev, avail);
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
vq->log_guest_addr = log;
-#endif
if (!(vq->desc && vq->used && vq->avail))
{
vq->desc = NULL;
vq->used = NULL;
vq->avail = NULL;
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
vq->log_guest_addr = 0;
-#endif
/* Check if all Qs are disabled */
int numqs = xd->vu_vhost_dev.virt_qp_nb * VIRTIO_QNUM;
vui->vrings[q].enabled = 0; /* Reset local copy */
vui->vrings[q].callfd = -1; /* Reset FD */
vq->enabled = 0;
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
vq->log_guest_addr = 0;
-#endif
vq->desc = NULL;
vq->used = NULL;
vq->avail = NULL;
break;
case VHOST_USER_SET_LOG_BASE:
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
DBG_SOCK ("if %d msg VHOST_USER_SET_LOG_BASE", xd->vlib_hw_if_index);
if (msg.size != sizeof (msg.log))
xd->vu_vhost_dev.log_size = msg.log.size;
msg.flags |= VHOST_USER_REPLY_MASK;
msg.size = sizeof (msg.u64);
-#else
- DBG_SOCK ("if %d msg VHOST_USER_SET_LOG_BASE Not-Implemented",
- xd->vlib_hw_if_index);
-#endif
break;
case VHOST_USER_SET_LOG_FD: