X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Finterface.h;h=d462e1e8448820aee6b5f5c17d28ea122bf1e262;hb=70083ee74c3141bbefb185525315f1b34497dcaa;hp=6a140d2059c84863e0c4b4e0af3a1acdacec9675;hpb=72d2c4f3718ba5293e9e0fa8726406ee7d9f3940;p=vpp.git diff --git a/src/vnet/interface.h b/src/vnet/interface.h index 6a140d2059c..d462e1e8448 100644 --- a/src/vnet/interface.h +++ b/src/vnet/interface.h @@ -76,6 +76,11 @@ typedef clib_error_t *(vnet_interface_set_rx_mode_function_t) (struct vnet_main_t * vnm, u32 if_index, u32 queue_id, vnet_hw_interface_rx_mode mode); +/* Interface set l2 mode callback. */ +typedef clib_error_t *(vnet_interface_set_l2_mode_function_t) + (struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi, + i32 l2_if_adjust); + typedef enum vnet_interface_function_priority_t_ { VNET_ITF_FUNC_PRIORITY_LOW, @@ -165,6 +170,9 @@ typedef struct _vnet_device_class /* Function to call interface rx mode is changed */ vnet_interface_set_rx_mode_function_t *rx_mode_change_function; + /* Function to call interface l2 mode is changed */ + vnet_interface_set_l2_mode_function_t *set_l2_mode_function; + /* Redistribute flag changes/existence of this interface class. */ u32 redistribute; @@ -504,14 +512,6 @@ typedef struct vnet_hw_interface_t /* Largest packet size for this interface. */ u32 max_packet_bytes; - /* Number of extra bytes that go on the wire. - Packet length on wire - = max (length + per_packet_overhead_bytes, min_packet_bytes). */ - u32 per_packet_overhead_bytes; - - /* Receive and transmit layer 3 packet size limits (MRU/MTU). */ - u32 max_l3_packet_bytes[VLIB_N_RX_TX]; - /* Hash table mapping sub interface id to sw_if_index. */ uword *sub_interface_sw_if_index_by_id; @@ -597,11 +597,15 @@ typedef struct typedef enum { + /* THe BVI interface */ + VNET_FLOOD_CLASS_BVI, /* Always flood */ VNET_FLOOD_CLASS_NORMAL, VNET_FLOOD_CLASS_TUNNEL_MASTER, /* Does not flood when tunnel master is in the same L2 BD */ - VNET_FLOOD_CLASS_TUNNEL_NORMAL + VNET_FLOOD_CLASS_TUNNEL_NORMAL, + /* Never flood to this type */ + VNET_FLOOD_CLASS_NO_FLOOD, } vnet_flood_class_t; /* Software-interface. This corresponds to a Ethernet VLAN, ATM vc, a @@ -644,6 +648,9 @@ typedef struct u32 link_speed; + /* Receive and transmit layer 3 packet size limits (MRU/MTU). */ + u32 max_l3_packet_bytes[VLIB_N_RX_TX]; + union { /* VNET_SW_INTERFACE_TYPE_HARDWARE. */