GBP Endpoint Updates
[vpp.git] / src / plugins / gbp / gbp_classify.c
index 859d4f9..53389f5 100644 (file)
@@ -16,6 +16,8 @@
  */
 
 #include <plugins/gbp/gbp.h>
+#include <vnet/l2/l2_input.h>
+#include <vnet/l2/feat_bitmap.h>
 
 typedef enum gbp_src_classify_type_t_
 {
@@ -73,6 +75,7 @@ gbp_classify_inline (vlib_main_t * vm,
       while (n_left_from > 0 && n_left_to_next > 0)
        {
          u32 next0, bi0, src_epg, sw_if_index0;
+         const gbp_endpoint_t *gep0;
          vlib_buffer_t *b0;
 
          bi0 = from[0];
@@ -88,14 +91,15 @@ gbp_classify_inline (vlib_main_t * vm,
 
          if (GBP_SRC_CLASSIFY_NULL == type)
            {
-             src_epg = ~0;
+             src_epg = EPG_INVALID;
              next0 =
                vnet_l2_feature_next (b0, gscm->l2_input_feat_next[type],
                                      L2INPUT_FEAT_GBP_NULL_CLASSIFY);
            }
          else
            {
-             src_epg = gbp_port_to_epg (sw_if_index0);
+             gep0 = gbp_endpoint_get_itf (sw_if_index0);
+             src_epg = gep0->ge_epg_id;
              if (is_l3)
                {
                  /*