X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fl2%2Fl2_input.h;h=0e1e98f883d80e3f94dceaaa024b6d6f0417a75e;hb=282872127;hp=4b303482df9ce59fa4667aa75efc3bd4f9258114;hpb=3b81a1e5f205482b8ea30edbfd39559c4368ac4d;p=vpp.git diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h index 4b303482df9..0e1e98f883d 100644 --- a/src/vnet/l2/l2_input.h +++ b/src/vnet/l2/l2_input.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -102,20 +103,26 @@ l2input_bd_config (u32 bd_index) _(DROP, "feature-bitmap-drop") \ _(XCONNECT, "l2-output") \ _(FLOOD, "l2-flood") \ + _(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") \ _(ACL, "l2-input-acl") \ _(POLICER_CLAS, "l2-policer-classify") \ + _(INPUT_FEAT_ARC, "l2-input-feat-arc") \ _(INPUT_CLASSIFY, "l2-input-classify") \ _(SPAN, "span-l2-input") @@ -133,6 +140,7 @@ STATIC_ASSERT (L2INPUT_N_FEAT <= 32, "too many l2 input features"); /* Feature bit masks */ typedef enum { + L2INPUT_FEAT_NONE = 0, #define _(sym,str) L2INPUT_FEAT_##sym = (1<feature_bitmap & L2INPUT_FEAT_ARP_UFWD) == + L2INPUT_FEAT_ARP_UFWD); +} + /** Masks for eliminating features that do not apply to a packet */ /** Get a pointer to the config for the given interface */ @@ -192,7 +207,8 @@ l2_input_config_t *l2input_intf_config (u32 sw_if_index); /* Enable (or disable) the feature in the bitmap for the given interface */ u32 l2input_intf_bitmap_enable (u32 sw_if_index, - u32 feature_bitmap, u32 enable); + l2input_feat_masks_t feature_bitmap, + u32 enable); /* Sets modifies flags from a bridge domain */ u32 l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value); @@ -213,7 +229,8 @@ u32 set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, u32 mode, u32 sw_if_index, - u32 bd_index, u32 bvi, u32 shg, u32 xc_sw_if_index); + 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) @@ -222,7 +239,7 @@ vnet_update_l2_len (vlib_buffer_t * b) u16 ethertype; u8 vlan_count = 0; - /* point at currrent l2 hdr */ + /* point at current l2 hdr */ eth = vlib_buffer_get_current (b); /* @@ -253,7 +270,7 @@ vnet_update_l2_len (vlib_buffer_t * b) * Compute flow hash of an ethernet packet, use 5-tuple hash if L3 packet * is ip4 or ip6. Otherwise hash on smac/dmac/etype. * The vlib buffer current pointer is expected to be at ethernet header - * and vnet l2.l2_len is exppected to be setup already. + * and vnet l2.l2_len is expected to be setup already. */ static inline u32 vnet_l2_compute_flow_hash (vlib_buffer_t * b)