summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/dpdk/dpdk.h20
-rw-r--r--src/vnet/devices/dpdk/format.c12
-rwxr-xr-xsrc/vnet/devices/dpdk/init.c10
-rw-r--r--src/vnet/devices/dpdk/main.c7
-rw-r--r--src/vnet/devices/dpdk/node.c12
5 files changed, 3 insertions, 58 deletions
diff --git a/src/vnet/devices/dpdk/dpdk.h b/src/vnet/devices/dpdk/dpdk.h
index 1b54460ecc0..79c694f7cbc 100644
--- a/src/vnet/devices/dpdk/dpdk.h
+++ b/src/vnet/devices/dpdk/dpdk.h
@@ -66,7 +66,6 @@ extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
extern vlib_node_registration_t handoff_dispatch_node;
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
_ ("net_e1000_em", E1000EM) \
@@ -85,25 +84,6 @@ extern vlib_node_registration_t handoff_dispatch_node;
_ ("net_cxgbe", CXGBE) \
_ ("net_mlx5", MLX5) \
_ ("net_dpaa2", DPAA2)
-#else
-#define foreach_dpdk_pmd \
- _ ("rte_nicvf_pmd", THUNDERX) \
- _ ("rte_em_pmd", E1000EM) \
- _ ("rte_igb_pmd", IGB) \
- _ ("rte_igbvf_pmd", IGBVF) \
- _ ("rte_ixgbe_pmd", IXGBE) \
- _ ("rte_ixgbevf_pmd", IXGBEVF) \
- _ ("rte_i40e_pmd", I40E) \
- _ ("rte_i40evf_pmd", I40EVF) \
- _ ("rte_virtio_pmd", VIRTIO) \
- _ ("rte_enic_pmd", ENIC) \
- _ ("rte_vmxnet3_pmd", VMXNET3) \
- _ ("AF_PACKET PMD", AF_PACKET) \
- _ ("rte_bond_pmd", BOND) \
- _ ("rte_pmd_fm10k", FM10K) \
- _ ("rte_cxgbe_pmd", CXGBE) \
- _ ("rte_dpaa2_dpni", DPAA2)
-#endif
typedef enum
{
diff --git a/src/vnet/devices/dpdk/format.c b/src/vnet/devices/dpdk/format.c
index cc0d71af3e7..1558630cc68 100644
--- a/src/vnet/devices/dpdk/format.c
+++ b/src/vnet/devices/dpdk/format.c
@@ -79,12 +79,6 @@
_(DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM, "outer-ipv4-cksum") \
_(DEV_TX_OFFLOAD_QINQ_INSERT, "qinq-insert")
-#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
-/* New ol_flags bits added in DPDK-16.11 */
-#define PKT_RX_IP_CKSUM_GOOD (1ULL << 7)
-#define PKT_RX_L4_CKSUM_GOOD (1ULL << 8)
-#endif
-
#define foreach_dpdk_pkt_rx_offload_flag \
_ (PKT_RX_VLAN_PKT, "RX packet is a 802.1q VLAN packet") \
_ (PKT_RX_RSS_HASH, "RX packet with RSS hash result") \
@@ -98,12 +92,6 @@
_ (PKT_RX_IEEE1588_TMST, "RX IEEE1588 L2/L4 timestamped packet") \
_ (PKT_RX_QINQ_STRIPPED, "RX packet QinQ tags stripped")
-#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
-/* PTYPE added in DPDK-16.11 */
-#define RTE_PTYPE_L2_ETHER_VLAN 0x00000006
-#define RTE_PTYPE_L2_ETHER_QINQ 0x00000007
-#endif
-
#define foreach_dpdk_pkt_type \
_ (L2, ETHER, "Ethernet packet") \
_ (L2, ETHER_TIMESYNC, "Ethernet packet for time sync") \
diff --git a/src/vnet/devices/dpdk/init.c b/src/vnet/devices/dpdk/init.c
index ec008c20707..f4700133d21 100755
--- a/src/vnet/devices/dpdk/init.c
+++ b/src/vnet/devices/dpdk/init.c
@@ -428,11 +428,8 @@ dpdk_lib_init (dpdk_main_t * dm)
/* workaround for drivers not setting driver_name */
if ((!dev_info.driver_name) && (dev_info.pci_dev))
-#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
- dev_info.driver_name = dev_info.pci_dev->driver->name;
-#else
dev_info.driver_name = dev_info.pci_dev->driver->driver.name;
-#endif
+
ASSERT (dev_info.driver_name);
if (!xd->pmd)
@@ -1608,11 +1605,8 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
struct rte_eth_dev_info dev_info;
rte_eth_dev_info_get (i, &dev_info);
if (!dev_info.driver_name)
-#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
- dev_info.driver_name = dev_info.pci_dev->driver->name;
-#else
dev_info.driver_name = dev_info.pci_dev->driver->driver.name;
-#endif
+
ASSERT (dev_info.driver_name);
if (strncmp (dev_info.driver_name, "rte_bond_pmd", 12) == 0)
{
diff --git a/src/vnet/devices/dpdk/main.c b/src/vnet/devices/dpdk/main.c
index 1e6ec2f892f..9ea3aa04b09 100644
--- a/src/vnet/devices/dpdk/main.c
+++ b/src/vnet/devices/dpdk/main.c
@@ -61,14 +61,12 @@ rte_delay_us_override (unsigned us)
return 0; // no override
}
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
static void
rte_delay_us_override_cb (unsigned us)
{
if (rte_delay_us_override (us) == 0)
rte_delay_us_block (us);
}
-#endif
static clib_error_t * dpdk_main_init (vlib_main_t * vm)
{
@@ -77,12 +75,9 @@ static clib_error_t * dpdk_main_init (vlib_main_t * vm)
if ((error = vlib_call_init_function (vm, dpdk_init)))
return error;
-#if DPDK
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
/* register custom delay function */
rte_delay_us_callback_register (rte_delay_us_override_cb);
-#endif
-#endif
+
return error;
}
diff --git a/src/vnet/devices/dpdk/node.c b/src/vnet/devices/dpdk/node.c
index e541cdbcbd2..bde9dfae76d 100644
--- a/src/vnet/devices/dpdk/node.c
+++ b/src/vnet/devices/dpdk/node.c
@@ -55,11 +55,6 @@ vlib_buffer_is_mpls (vlib_buffer_t * b)
return (h->type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS_UNICAST));
}
-#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
-/* New ol_flags bits added in DPDK-16.11 */
-#define PKT_RX_IP_CKSUM_GOOD (1ULL << 7)
-#endif
-
always_inline u32
dpdk_rx_next_from_etype (struct rte_mbuf * mb, vlib_buffer_t * b0)
{
@@ -79,15 +74,8 @@ dpdk_rx_next_from_etype (struct rte_mbuf * mb, vlib_buffer_t * b0)
always_inline int
dpdk_mbuf_is_vlan (struct rte_mbuf *mb)
{
-#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
return (mb->packet_type & RTE_PTYPE_L2_ETHER_VLAN) ==
RTE_PTYPE_L2_ETHER_VLAN;
-#else
- return
- (mb->ol_flags &
- (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED | PKT_RX_QINQ_STRIPPED)) ==
- PKT_RX_VLAN_PKT;
-#endif
}
always_inline int