summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/init.c49
-rw-r--r--vnet/vnet/devices/dpdk/vhost_user.c15
-rw-r--r--vnet/vnet/devices/virtio/vhost-user.h4
3 files changed, 0 insertions, 68 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 64623c14260..8077ef8071e 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -610,17 +610,6 @@ dpdk_lib_init (dpdk_main_t * dm)
}
}
-#if RTE_VERSION < RTE_VERSION_NUM(16, 4, 0, 0)
- /*
- * Older VMXNET3 driver doesn't support jumbo / multi-buffer pkts
- */
- if (xd->pmd == VNET_DPDK_PMD_VMXNET3)
- {
- xd->port_conf.rxmode.max_rx_pkt_len = 1518;
- xd->port_conf.rxmode.jumbo_frame = 0;
- }
-#endif
-
if (xd->pmd == VNET_DPDK_PMD_AF_PACKET)
{
f64 now = vlib_time_now (vm);
@@ -796,14 +785,6 @@ dpdk_lib_init (dpdk_main_t * dm)
clib_warning ("VLAN strip cannot be supported by interface\n");
}
-#if RTE_VERSION < RTE_VERSION_NUM(16, 4, 0, 0)
- /*
- * Older VMXNET3 driver doesn't support jumbo / multi-buffer pkts
- */
- else if (xd->pmd == VNET_DPDK_PMD_VMXNET3)
- hi->max_packet_bytes = 1518;
-#endif
-
hi->max_l3_packet_bytes[VLIB_RX] = hi->max_l3_packet_bytes[VLIB_TX] =
xd->port_conf.rxmode.max_rx_pkt_len - sizeof (ethernet_header_t);
@@ -1485,7 +1466,6 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
break;
}
}
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
if (hw_flags_chg || (xd->link.link_speed != prev_link.link_speed))
{
hw_flags_chg = 1;
@@ -1513,35 +1493,6 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
break;
}
}
-#else
- if (hw_flags_chg || (xd->link.link_speed != prev_link.link_speed))
- {
- hw_flags_chg = 1;
- switch (xd->link.link_speed)
- {
- case ETH_LINK_SPEED_10:
- hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_10M;
- break;
- case ETH_LINK_SPEED_100:
- hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_100M;
- break;
- case ETH_LINK_SPEED_1000:
- hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_1G;
- break;
- case ETH_LINK_SPEED_10000:
- hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_10G;
- break;
- case ETH_LINK_SPEED_40G:
- hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_40G;
- break;
- case 0:
- break;
- default:
- clib_warning ("unknown link speed %d", xd->link.link_speed);
- break;
- }
- }
-#endif
if (hw_flags_chg)
{
if (LINK_STATE_ELOGS)
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c
index 46fae60dac7..e37dfde1f73 100644
--- a/vnet/vnet/devices/dpdk/vhost_user.c
+++ b/vnet/vnet/devices/dpdk/vhost_user.c
@@ -418,7 +418,6 @@ dpdk_create_vhost_user_if_internal (u32 * hw_if_index, u32 if_id, u8 * hwaddr)
return 0;
}
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
static long
get_huge_page_size (int fd)
{
@@ -426,7 +425,6 @@ 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)
@@ -443,7 +441,6 @@ dpdk_vhost_user_get_features (u32 hw_if_index, u64 * 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) | \
@@ -456,7 +453,6 @@ dpdk_vhost_user_get_features (u32 hw_if_index, u64 * features)
* not support offloading breaks L4 traffic.
*/
*features &= (~OFFLOAD_FEATURES);
-#endif
DBG_SOCK ("supported features: 0x%lx", *features);
return 0;
@@ -604,9 +600,7 @@ dpdk_vhost_user_set_vring_addr (u32 hw_if_index, u8 idx, uword desc,
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))
{
@@ -675,9 +669,7 @@ dpdk_vhost_user_get_vring_base (u32 hw_if_index, u8 idx, u32 * num)
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;
@@ -1031,9 +1023,7 @@ dpdk_vhost_user_if_disconnect (dpdk_device_t * xd)
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;
@@ -1287,7 +1277,6 @@ dpdk_vhost_user_socket_read (unix_file_t * uf)
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))
@@ -1329,10 +1318,6 @@ dpdk_vhost_user_socket_read (unix_file_t * uf)
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:
diff --git a/vnet/vnet/devices/virtio/vhost-user.h b/vnet/vnet/devices/virtio/vhost-user.h
index af4eb644160..47fad1d6465 100644
--- a/vnet/vnet/devices/virtio/vhost-user.h
+++ b/vnet/vnet/devices/virtio/vhost-user.h
@@ -36,12 +36,8 @@
#define RTE_VERSION_NUM(a,b,c,d) 1
#define RTE_VERSION 0
#endif
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
#define VHOST_USER_PROTOCOL_FEATURES ((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
(1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD))
-#else
-#define VHOST_USER_PROTOCOL_FEATURES (1ULL << VHOST_USER_PROTOCOL_F_MQ)
-#endif
/* If multiqueue is provided by host, then we suppport it. */
#define VIRTIO_NET_CTRL_MQ 4