X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fethernet%2Fethernet.h;h=ceaadd26c1cdbb1301a745a7d871e17f65c49551;hb=ddf6e08d2e3fc1614430e26dea632fbc79df2906;hp=cc44c4e2cf0fbbbc558f292d4e42c2b65d70a237;hpb=ecdfb2cbee547a113d3700da07c8920924bfb62d;p=vpp.git diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h index cc44c4e2cf0..ceaadd26c1c 100644 --- a/src/vnet/ethernet/ethernet.h +++ b/src/vnet/ethernet/ethernet.h @@ -45,6 +45,20 @@ #include #include +/* ethernet-input frame flags and scalar data */ + +/* all packets in frame share same sw_if_index */ +#define ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX (1 << 0) + +/* all ip4 packets in frame have correct ip4 checksum */ +#define ETH_INPUT_FRAME_F_IP4_CKSUM_OK (1 << 1) + +typedef struct +{ + u32 sw_if_index; + u32 hw_if_index; +} ethernet_input_frame_t; + always_inline u64 ethernet_mac_address_u64 (const u8 * a) { @@ -154,6 +168,7 @@ typedef u32 (ethernet_flag_change_function_t) /* Ethernet interface instance. */ typedef struct ethernet_interface { + u32 flags; /* Accept all packets (promiscuous mode). */ #define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL (1 << 0) @@ -502,7 +517,6 @@ eth_vlan_table_lookups (ethernet_main_t * em, // Returns 1 if a matching subinterface was found, otherwise returns 0. always_inline u32 eth_identify_subint (vnet_hw_interface_t * hi, - vlib_buffer_t * b0, u32 match_flags, main_intf_t * main_intf, vlan_intf_t * vlan_intf, @@ -529,13 +543,13 @@ eth_identify_subint (vnet_hw_interface_t * hi, if ((subint->flags & match_flags) == match_flags) goto matched; - // check for untagged interface - subint = &main_intf->untagged_subint; + // check for default interface + subint = &main_intf->default_subint; if ((subint->flags & match_flags) == match_flags) goto matched; - // check for default interface - subint = &main_intf->default_subint; + // check for untagged interface + subint = &main_intf->untagged_subint; if ((subint->flags & match_flags) == match_flags) goto matched;