aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 0ffaffed5d4..f65b653c5d4 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -599,6 +599,39 @@ typedef struct
#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;
+} 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
@@ -635,6 +668,9 @@ typedef struct vnet_hw_interface_t
/* 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. */
@@ -688,6 +724,9 @@ typedef struct vnet_hw_interface_t
/* rx queues */
u32 *rx_queue_indices;
+ /* tx queues */
+ u32 *tx_queue_indices;
+
/* numa node that hardware device connects to */
u8 numa_node;
@@ -955,6 +994,10 @@ typedef struct
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;