18 #ifndef included_vnet_l2_input_h 19 #define included_vnet_l2_input_h 60 u32 feat_next_node_index[32];
89 #define foreach_l2input_feat \ 90 _(DROP, "feature-bitmap-drop") \ 91 _(CLASSIFY, "l2-classify") \ 92 _(XCONNECT, "l2-output") \ 93 _(IPIW, "feature-bitmap-drop") \ 94 _(FLOOD, "l2-flood") \ 95 _(ARP_TERM, "arp-term-l2bd") \ 96 _(UU_FLOOD, "l2-flood") \ 99 _(LEARN, "l2-learn") \ 100 _(VTR, "l2-input-vtr") \ 101 _(VPATH, "vpath-input-l2") \ 102 _(CTRL_PKT, "feature-bitmap-drop") \ 103 _(L2PT, "feature-bitmap-drop") \ 104 _(IGMP_SNOOP, "feature-bitmap-drop") \ 105 _(MLD_SNOOP, "feature-bitmap-drop") \ 106 _(DHCP_SNOOP, "feature-bitmap-drop") \ 107 _(DAI, "feature-bitmap-drop") \ 108 _(IPSG, "feature-bitmap-drop") \ 109 _(ACL, "l2-input-acl") \ 110 _(QOS, "feature-bitmap-drop") \ 111 _(CFM, "feature-bitmap-drop") \ 112 _(SPAN, "feature-bitmap-drop") 116 #define _(sym,str) L2INPUT_FEAT_##sym##_BIT, 124 #define _(sym,str) L2INPUT_FEAT_##sym = (1<<L2INPUT_FEAT_##sym##_BIT), 142 L2INPUT_FEAT_UU_FLOOD);
160 L2INPUT_FEAT_ARP_TERM);
165 #define IP4_FEAT_MASK ~(L2INPUT_FEAT_CTRL_PKT | \ 166 L2INPUT_FEAT_MLD_SNOOP | \ 167 L2INPUT_FEAT_L2PT | \ 171 #define IP6_FEAT_MASK ~(L2INPUT_FEAT_CTRL_PKT | \ 172 L2INPUT_FEAT_IGMP_SNOOP | \ 173 L2INPUT_FEAT_L2PT | \ 177 #define IP_UDP_TCP_FEAT_MASK ~(L2INPUT_FEAT_CTRL_PKT | \ 178 L2INPUT_FEAT_L2PT | \ 179 L2INPUT_FEAT_IGMP_SNOOP | \ 180 L2INPUT_FEAT_MLD_SNOOP | \ 181 L2INPUT_FEAT_DHCP_SNOOP | \ 185 #define MPLS_FEAT_MASK ~(L2INPUT_FEAT_CTRL_PKT | \ 186 L2INPUT_FEAT_L2PT | \ 187 L2INPUT_FEAT_IGMP_SNOOP | \ 188 L2INPUT_FEAT_MLD_SNOOP | \ 189 L2INPUT_FEAT_DHCP_SNOOP | \ 209 #define MODE_L2_BRIDGE 1 211 #define MODE_L2_CLASSIFY 3 213 #define MODE_ERROR_ETH 1 214 #define MODE_ERROR_BVI_DEF 2 242 ethertype = clib_net_to_host_u16(eth->
type);
243 if ((ethertype == ETHERNET_TYPE_VLAN) ||
244 (ethertype == ETHERNET_TYPE_DOT1AD) ||
245 (ethertype == ETHERNET_TYPE_VLAN_9100) ||
246 (ethertype == ETHERNET_TYPE_VLAN_9200)) {
250 vlan = (
void *) (eth+1);
251 ethertype = clib_net_to_host_u16 (vlan->
type);
252 if (ethertype == ETHERNET_TYPE_VLAN) {
270 u16 ethertype = clib_net_to_host_u16(*(
u16 *)(l3h - 2));
272 if (ethertype == ETHERNET_TYPE_IP4)
274 else if (ethertype == ETHERNET_TYPE_IP6)
l2_input_config_t * configs
always_inline u32 bd_is_valid(l2_bridge_domain_t *bd_config)
struct _vlib_node_registration vlib_node_registration_t
always_inline u32 ip6_compute_flow_hash(ip6_header_t *ip, u32 flow_hash_config)
#define hash_v3_mix32(a, b, c)
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define static_always_inline
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define ethernet_buffer_set_vlan_count(b, v)
Sets the number of VLAN headers in the current Ethernet frame in the buffer.
#define hash_v3_finalize32(a, b, c)
#define IP_FLOW_HASH_DEFAULT
always_inline u32 ip4_compute_flow_hash(ip4_header_t *ip, u32 flow_hash_config)
l2_bridge_domain_t * bd_configs