misc: deprecate gbp and its dependents
[vpp.git] / src / vnet / l2 / l2_input.h
index 9a59d35..7d1dc9c 100644 (file)
 #ifndef included_vnet_l2_input_h
 #define included_vnet_l2_input_h
 
+#include <stdbool.h>
+
 #include <vlib/vlib.h>
 #include <vnet/vnet.h>
 #include <vnet/l2/l2_bd.h>
 #include <vnet/ethernet/ethernet.h>
 #include <vnet/ethernet/packet.h>
-#include <vnet/ip/ip.h>
+#include <vnet/ip/ip4_inlines.h>
+#include <vnet/ip/ip6_inlines.h>
 
 /* l2 connection type */
 typedef enum l2_input_flags_t_
@@ -92,6 +95,8 @@ typedef struct
   /* convenience variables */
   vlib_main_t *vlib_main;
   vnet_main_t *vnet_main;
+
+  u16 msg_id_base;
 } l2input_main_t;
 
 extern l2input_main_t l2input_main;
@@ -131,17 +136,10 @@ l2input_bd_config (u32 bd_index)
  _(ARP_UFWD,      "l2-uu-fwd")                  \
  _(ARP_TERM,      "arp-term-l2bd")              \
  _(UU_FLOOD,      "l2-flood")                   \
- _(GBP_FWD,       "gbp-fwd")                    \
  _(UU_FWD,        "l2-uu-fwd")                  \
  _(FWD,           "l2-fwd")                     \
  _(RW,            "l2-rw")                      \
  _(LEARN,         "l2-learn")                   \
- _(L2_EMULATION,  "l2-emulation")               \
- _(GBP_LEARN,     "gbp-learn-l2")               \
- _(GBP_LPM_ANON_CLASSIFY, "l2-gbp-lpm-anon-classify") \
- _(GBP_NULL_CLASSIFY, "gbp-null-classify")      \
- _(GBP_SRC_CLASSIFY,  "gbp-src-classify")       \
- _(GBP_LPM_CLASSIFY,  "l2-gbp-lpm-classify")    \
  _(VTR,           "l2-input-vtr")               \
  _(L2_IP_QOS_RECORD, "l2-ip-qos-record")        \
  _(VPATH,         "vpath-input-l2")             \
@@ -291,8 +289,8 @@ u32 set_int_l2_mode (vlib_main_t * vm,
                     u32 bd_index, l2_bd_port_type_t port_type,
                     u32 shg, u32 xc_sw_if_index);
 
-static inline void
-vnet_update_l2_len (vlib_buffer_t * b)
+static inline u16
+vnet_update_l2_len (vlib_buffer_t *b)
 {
   ethernet_header_t *eth;
   u16 ethertype;
@@ -323,6 +321,8 @@ vnet_update_l2_len (vlib_buffer_t * b)
        }
     }
   ethernet_buffer_set_vlan_count (b, vlan_count);
+
+  return (ethertype);
 }
 
 /*