/* $$$$ We should rename always_inline -> clib_always_inline */
#undef always_inline
+#define ALLOW_EXPERIMENTAL_API
+
#include <rte_config.h>
#include <rte_common.h>
_ ("net_dpaa2", DPAA2) \
_ ("net_virtio_user", VIRTIO_USER) \
_ ("net_vhost", VHOST_ETHER) \
- _ ("net_ena", ENA)
+ _ ("net_ena", ENA) \
+ _ ("net_failsafe", FAILSAFE) \
+ _ ("net_liovf", LIOVF_ETHER) \
+ _ ("net_qede", QEDE)
typedef enum
{
VNET_DPDK_PORT_TYPE_ETH_VF,
VNET_DPDK_PORT_TYPE_VIRTIO_USER,
VNET_DPDK_PORT_TYPE_VHOST_ETHER,
+ VNET_DPDK_PORT_TYPE_FAILSAFE,
VNET_DPDK_PORT_TYPE_UNKNOWN,
} dpdk_port_type_t;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
volatile u32 **lockp;
- /* Instance ID */
+ /* Instance ID to access internal device array. */
dpdk_portid_t device_index;
+ /* DPDK device port number */
+ dpdk_portid_t port_id;
+
u32 hw_if_index;
u32 sw_if_index;
/* flow related */
u32 supported_flow_actions;
dpdk_flow_entry_t *flow_entries; /* pool */
- dpdk_flow_lookup_entry_t *flow_lookup_entries; /* vector */
+ dpdk_flow_lookup_entry_t *flow_lookup_entries; /* pool */
+ u32 *parked_lookup_indexes; /* vector */
+ u32 parked_loop_count;
struct rte_flow_error last_flow_error;
/* HQoS related */
dpdk_device_hqos_per_hqos_thread_t *hqos_ht;
/* af_packet or BondEthernet instance number */
- dpdk_portid_t port_id;
+ u16 af_packet_instance_num;
+ u16 bond_instance_num;
/* Bonded interface port# of a slave -
only valid if DPDK_DEVICE_FLAG_BOND_SLAVE bit is set */
vlib_buffer_t buffer_template;
} dpdk_per_thread_data_t;
+typedef struct
+{
+ int pcap_enable;
+ u32 pcap_sw_if_index;
+ pcap_main_t pcap_main;
+} dpdk_pcap_t;
+
typedef struct
{
/* buffer flags template, configurable to enable/disable tcp / udp cksum */
u32 buffer_flags_template;
- /* pcap tracing [only works if (CLIB_DEBUG > 0)] */
- int tx_pcap_enable;
+ /* pcap tracing */
+ dpdk_pcap_t pcap[VLIB_N_RX_TX];
+
+ int pcap_enable;
pcap_main_t pcap_main;
u8 *pcap_filename;
u32 pcap_sw_if_index;
f64 link_state_poll_interval;
f64 stat_poll_interval;
- /* Sleep for this many usec after each device poll */
- u32 poll_sleep_usec;
-
/* convenience */
vlib_main_t *vlib_main;
vnet_main_t *vnet_main;