From 1cd0e5dd533f4209dde453eaa43215e52cd42985 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 17 Jan 2022 14:49:17 +0100 Subject: vnet: distinguish between max_frame_size and MTU Type: improvement Change-Id: I3659de6599f402c92e3855e3bf0e5e3388f2bea0 Signed-off-by: Damjan Marion --- src/vnet/interface.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/vnet/interface.h') diff --git a/src/vnet/interface.h b/src/vnet/interface.h index 2eb50aed5e8..c8fbc61ec7b 100644 --- a/src/vnet/interface.h +++ b/src/vnet/interface.h @@ -71,7 +71,7 @@ typedef clib_error_t *(vnet_subif_add_del_function_t) struct vnet_sw_interface_t * template, int is_add); /* Interface set mtu callback. */ -typedef clib_error_t *(vnet_interface_set_mtu_function_t) ( +typedef clib_error_t *(vnet_interface_set_max_frame_size_function_t) ( struct vnet_main_t *vnm, struct vnet_hw_interface_t *hi, u32 mtu); /* Interface set mac address callback. */ @@ -432,8 +432,9 @@ typedef struct _vnet_hw_interface_class /* Function to add/delete additional MAC addresses */ vnet_interface_add_del_mac_address_function_t *mac_addr_add_del_function; - /* Function to set mtu. */ - vnet_interface_set_mtu_function_t *set_mtu; + + /* Function to set max frame size. */ + vnet_interface_set_max_frame_size_function_t *set_max_frame_size; /* Format function to display interface name. */ format_function_t *format_interface_name; @@ -701,17 +702,14 @@ typedef struct vnet_hw_interface_t /* Maximum transmit rate for this interface in bits/sec. */ f64 max_rate_bits_per_sec; - /* Smallest packet size supported by this interface. */ - u32 min_supported_packet_bytes; - - /* Largest packet size supported by this interface. */ - u32 max_supported_packet_bytes; - /* Smallest packet size for this interface. */ - u32 min_packet_bytes; + u32 min_frame_size; + + /* Largest frame size for this interface. */ + u32 max_frame_size; - /* Largest packet size for this interface. */ - u32 max_packet_bytes; + /* Layer 2 overhead */ + u16 frame_overhead; /* Hash table mapping sub interface id to sw_if_index. */ uword *sub_interface_sw_if_index_by_id; -- cgit 1.2.3-korg