l2: remove unused types and includes form feature arc code
Type: improvement
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ia441c069afe79ccd6428159df944d4c1d10a992d
diff --git a/src/vnet/l2/l2_in_out_feat_arc.c b/src/vnet/l2/l2_in_out_feat_arc.c
index 8717ea9..37efa07 100644
--- a/src/vnet/l2/l2_in_out_feat_arc.c
+++ b/src/vnet/l2/l2_in_out_feat_arc.c
@@ -16,17 +16,10 @@
*/
#include <vlib/vlib.h>
-#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#include <vnet/ethernet/ethernet.h>
-#include <vnet/ethernet/packet.h>
#include <vnet/ip/ip_packet.h>
-#include <vnet/ip/ip4_packet.h>
-#include <vnet/ip/ip6_packet.h>
-#include <vlib/cli.h>
#include <vnet/l2/l2_input.h>
#include <vnet/l2/l2_output.h>
-#include <vnet/l2/feat_bitmap.h>
#include <vnet/l2/l2_in_out_feat_arc.h>
#include <vppinfra/error.h>
@@ -43,10 +36,6 @@
u8 ip6_feat_arc_index[IN_OUT_FEAT_ARC_N_TABLE_GROUPS];
u8 nonip_feat_arc_index[IN_OUT_FEAT_ARC_N_TABLE_GROUPS];
u32 next_slot[IN_OUT_FEAT_ARC_N_TABLE_GROUPS];
-
- /* convenience variables */
- vlib_main_t *vlib_main;
- vnet_main_t *vnet_main;
} l2_in_out_feat_arc_main_t __attribute__ ((aligned (CLIB_CACHE_LINE_BYTES)));
typedef struct
@@ -540,9 +529,6 @@
{
l2_in_out_feat_arc_main_t *mp = &l2_in_out_feat_arc_main;
- mp->vlib_main = vm;
- mp->vnet_main = vnet_get_main ();
-
/* Initialize the feature next-node indexes */
feat_bitmap_init_next_nodes (vm,
l2_in_feat_arc_end_node.index,
diff --git a/src/vnet/l2/l2_in_out_feat_arc.h b/src/vnet/l2/l2_in_out_feat_arc.h
index 0b5279c..69ee035 100644
--- a/src/vnet/l2/l2_in_out_feat_arc.h
+++ b/src/vnet/l2/l2_in_out_feat_arc.h
@@ -41,18 +41,6 @@
IN_OUT_FEAT_ARC_N_TABLE_GROUPS
} in_out_feat_arc_table_group_id_t;
-typedef struct
-{
- /* convenience variables */
- vlib_main_t *vlib_main;
- vnet_main_t *vnet_main;
- vnet_classify_main_t *vnet_classify_main;
- vnet_config_main_t
- *
- vnet_config_main[IN_OUT_FEAT_ARC_N_TABLE_GROUPS]
- [IN_OUT_FEAT_ARC_N_TABLES];
-} in_out_feat_arc_main_t;
-
int vnet_l2_feature_enable_disable (const char *arc_name,
const char *node_name, u32 sw_if_index,
int enable_disable, void *feature_config,