/* Error strings indexed by error code for this node. */
char **tx_function_error_strings;
+ vlib_error_desc_t *tx_function_error_counters;
/* Number of error codes used by this node. */
u32 tx_function_n_errors;
r->next_registration = devclass.tx_fn_registrations; \
devclass.tx_fn_registrations = r; \
} \
- uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (devclass##_tx_fn)
+ uword CLIB_MARCH_SFX (devclass##_tx_fn)
/**
* Link Type: A description of the protocol of packets on the link.
#define VNET_HW_IF_RXQ_NO_RX_INTERRUPT ~0
} vnet_hw_if_rx_queue_t;
+typedef struct
+{
+ u8 shared_queue : 1;
+ /* hw interface index */
+ u32 hw_if_index;
+
+ /* hardware queue identifier */
+ u32 queue_id;
+
+ /* bitmap of threads which use this queue */
+ clib_bitmap_t *threads;
+} vnet_hw_if_tx_queue_t;
+
+typedef enum
+{
+ VNET_HW_IF_TX_FRAME_HINT_NOT_CHAINED = (1 << 0),
+ VNET_HW_IF_TX_FRAME_HINT_NO_GSO = (1 << 1),
+ VNET_HW_IF_TX_FRAME_HINT_NO_CKSUM_OFFLOAD = (1 << 2),
+} vnet_hw_if_tx_frame_hint_t;
+
+typedef struct
+{
+ u8 shared_queue : 1;
+ vnet_hw_if_tx_frame_hint_t hints : 16;
+ u32 queue_id;
+} vnet_hw_if_tx_frame_t;
+
+typedef struct
+{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+ vnet_hw_if_tx_frame_t frame;
+ u32 n_threads;
+} vnet_hw_if_output_node_runtime_t;
+
/* Hardware-interface. This corresponds to a physical wire
that packets flow over. */
typedef struct vnet_hw_interface_t
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
- /* Interface name. */
- u8 *name;
-
/* flags */
vnet_hw_interface_flags_t flags;
/* capabilities flags */
vnet_hw_interface_capabilities_t caps;
- /* link speed in kbps */
- u32 link_speed;
-
/* Hardware address as vector. Zero (e.g. zero-length vector) if no
address for this class (e.g. PPP). */
u8 *hw_address;
/* NAME.{output,tx} nodes for this interface. */
u32 output_node_index, tx_node_index;
+ /* interface-output-arc-end node next index for tx node */
+ u32 if_out_arc_end_node_next_index;
+
/* (dev_class, dev_instance) uniquely identifies hw interface. */
u32 dev_class_index;
u32 dev_instance;
/* Software index for this hardware interface. */
u32 sw_if_index;
+ /* per thread output-node runtimes */
+ vnet_hw_if_output_node_runtime_t *output_node_thread_runtimes;
+
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
+ /* Interface name. */
+ u8 *name;
+
+ /* link speed in kbps */
+ u32 link_speed;
+
/* Next index in interface-output node for this interface
used by node function vnet_per_buffer_interface_output() */
u32 output_node_next_index;
/* rx queues */
u32 *rx_queue_indices;
+ /* tx queues */
+ u32 *tx_queue_indices;
+
/* numa node that hardware device connects to */
u8 numa_node;
typedef struct
{
- vnet_hw_if_rxq_poll_vector_t *rxq_poll_vector;
+ vnet_hw_if_rxq_poll_vector_t *rxq_vector_int;
+ vnet_hw_if_rxq_poll_vector_t *rxq_vector_poll;
void *rxq_interrupts;
} vnet_hw_if_rx_node_runtime_t;
vnet_hw_if_rx_queue_t *hw_if_rx_queues;
uword *rxq_index_by_hw_if_index_and_queue_id;
+ /* Hardware interface TX queues */
+ vnet_hw_if_tx_queue_t *hw_if_tx_queues;
+ uword *txq_index_by_hw_if_index_and_queue_id;
+
/* Hash table mapping HW interface name to index. */
uword *hw_interface_by_name;
/* feature_arc_index */
u8 output_feature_arc_index;
+
+ /* fast lookup tables */
+ u32 *hw_if_index_by_sw_if_index;
+ u16 *if_out_arc_end_next_index_by_sw_if_index;
} vnet_interface_main_t;
static inline void
u8 free_data;
u32 sw_if_index;
int filter;
+ vlib_error_t drop_err;
} vnet_pcap_dispatch_trace_args_t;
int vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t *);
extern vlib_node_registration_t vnet_interface_output_node;
+extern vlib_node_registration_t vnet_interface_output_arc_end_node;
#endif /* included_vnet_interface_h */