summaryrefslogtreecommitdiffstats
path: root/src/vnet/span/span.h
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-07-16 09:34:53 +0300
committerEyal Bari <ebari@cisco.com>2017-07-24 08:21:52 +0300
commit001fd406df771f1cf73ca0dea440c8bde309e077 (patch)
treebfa98f32f5cba2d5fe06e2bc39a03b4d6ce98112 /src/vnet/span/span.h
parentbeb0b2e346c63e21ffe892ae0e04b67bb10fba5e (diff)
SPAN:add l2 mirror
added span feature nodes for l2-input / l2-output Change-Id: Ib6e0ce60d0811901b6edd70209e6a4c4a35cd8ff Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/span/span.h')
-rw-r--r--src/vnet/span/span.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/vnet/span/span.h b/src/vnet/span/span.h
index a98b010bf61..10de8272ab0 100644
--- a/src/vnet/span/span.h
+++ b/src/vnet/span/span.h
@@ -18,17 +18,32 @@
#include <vnet/vnet.h>
#include <vnet/ip/ip.h>
+#include <vnet/l2/l2_output.h>
+
+typedef enum
+{
+ SPAN_FEAT_DEVICE,
+ SPAN_FEAT_L2,
+ SPAN_FEAT_N
+} span_feat_t;
+
+typedef struct
+{
+ clib_bitmap_t *mirror_ports;
+ u32 num_mirror_ports;
+} span_mirror_t;
typedef struct
{
- clib_bitmap_t *rx_mirror_ports;
- clib_bitmap_t *tx_mirror_ports;
- u32 num_rx_mirror_ports;
- u32 num_tx_mirror_ports;
+ span_mirror_t mirror_rxtx[SPAN_FEAT_N][VLIB_N_RX_TX];
} span_interface_t;
typedef struct
{
+ /* l2 feature Next nodes */
+ u32 l2_input_next[32];
+ u32 l2_output_next[32];
+
/* per-interface vector of span instances */
span_interface_t *interfaces;
@@ -52,7 +67,7 @@ typedef struct
int
span_add_delete_entry (vlib_main_t * vm, u32 src_sw_if_index,
- u32 dst_sw_if_index, u8 is_add);
+ u32 dst_sw_if_index, u8 state, span_feat_t sf);
/*
* fd.io coding-style-patch-verification: ON
*