summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-11-06 23:25:57 +0100
committerDamjan Marion <dmarion@me.com>2021-01-21 13:20:10 +0000
commit941005336ee8cec614a856089f3d873f7d98135c (patch)
tree2a9287e8a16cfbfecac80251637658a4cf93db66 /src/vnet/interface.h
parent1e4309538dd178827fc2a5efb3ceb80a4b1f1a8f (diff)
interface: rx queue infra rework, part one
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 71d6a775708..03c65d769ee 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -525,6 +525,29 @@ typedef enum vnet_hw_interface_flags_t_
(VNET_HW_INTERFACE_FLAG_HALF_DUPLEX | \
VNET_HW_INTERFACE_FLAG_FULL_DUPLEX)
+typedef struct
+{
+ /* hw interface index */
+ u32 hw_if_index;
+
+ /* device instance */
+ u32 dev_instance;
+
+ /* index of thread pollling this queue */
+ u32 thread_index;
+
+ /* file index of queue interrupt line */
+ u32 file_index;
+
+ /* hardware queue identifier */
+ u32 queue_id;
+
+ /* mode */
+ vnet_hw_if_rx_mode mode : 8;
+#define VNET_HW_IF_RXQ_THREAD_ANY ~0
+#define VNET_HW_IF_RXQ_NO_RX_INTERRUPT ~0
+} vnet_hw_if_rx_queue_t;
+
/* Hardware-interface. This corresponds to a physical wire
that packets flow over. */
typedef struct vnet_hw_interface_t
@@ -609,6 +632,9 @@ typedef struct vnet_hw_interface_t
/* device input device_and_queue runtime index */
uword *dq_runtime_index_by_queue;
+ /* rx queues */
+ u32 *rx_queue_indices;
+
/* numa node that hardware device connects to */
u8 numa_node;
@@ -621,6 +647,18 @@ typedef struct vnet_hw_interface_t
u32 trace_classify_table_index;
} vnet_hw_interface_t;
+typedef struct
+{
+ u32 dev_instance;
+ u32 queue_id;
+} vnet_hw_if_rxq_poll_vector_t;
+
+typedef struct
+{
+ vnet_hw_if_rxq_poll_vector_t *rxq_poll_vector;
+ void *rxq_interrupts;
+} vnet_hw_if_rx_node_runtime_t;
+
extern vnet_device_class_t vnet_local_interface_device_class;
typedef enum
@@ -857,6 +895,10 @@ typedef struct
/* Hardware interfaces. */
vnet_hw_interface_t *hw_interfaces;
+ /* Hardware interface RX queues */
+ vnet_hw_if_rx_queue_t *hw_if_rx_queues;
+ uword *rxq_index_by_hw_if_index_and_queue_id;
+
/* Hash table mapping HW interface name to index. */
uword *hw_interface_by_name;