summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-04-16 11:49:26 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-04-19 16:43:22 +0000
commit8932e450224fccdd8dad8992eb90bfead0ae7a7d (patch)
treea4a6784a6bfdfc96c48658fd59f85e963213dc16 /src/vnet/interface.h
parentae34872077c956aa34ee816b55ccb5c5f6ab40a1 (diff)
interface: interface-output end node rework
- rename node to more meaningful name - introduce lookup tables - enable multiarch - quad-loop node - enqqueue to next instead of enqueueing to node Type: improvement Change-Id: Ibb208047ae04bb6cfe56db558d3b8938bc14b4fe Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 8424b71c545..b36d02c32bf 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -603,18 +603,12 @@ typedef struct
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;
@@ -623,6 +617,9 @@ typedef struct vnet_hw_interface_t
/* 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;
@@ -639,6 +636,12 @@ typedef struct vnet_hw_interface_t
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;
@@ -992,6 +995,10 @@ typedef struct
/* 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
@@ -1037,6 +1044,7 @@ typedef struct
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 */