aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_funcs.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-17 14:49:17 +0100
committerOle Tr�an <otroan@employees.org>2022-01-18 13:20:21 +0000
commit1cd0e5dd533f4209dde453eaa43215e52cd42985 (patch)
tree88ed4b47252cfe27c13ac0f85a6cfc86a7052d5b /src/vnet/interface_funcs.h
parent49378f206b8e780a898e632f7dd8db912b9b118e (diff)
vnet: distinguish between max_frame_size and MTU
Type: improvement Change-Id: I3659de6599f402c92e3855e3bf0e5e3388f2bea0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface_funcs.h')
-rw-r--r--src/vnet/interface_funcs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index 57e0d33b406..5434542cd7c 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -310,7 +310,7 @@ always_inline u32
vnet_hw_interface_get_mtu (vnet_main_t * vnm, u32 hw_if_index)
{
vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);
- return hw->max_packet_bytes;
+ return hw->max_frame_size - hw->frame_overhead;
}
always_inline u32
@@ -430,6 +430,10 @@ clib_error_t *set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id,
/* Set tx-queue placement on the interface */
int set_hw_interface_tx_queue (u32 hw_if_index, u32 queue_id, uword *bitmap);
+/* Set the Max Frame Size on the HW interface */
+clib_error_t *vnet_hw_interface_set_max_frame_size (vnet_main_t *vnm,
+ u32 hw_if_index,
+ u32 max_frame_size);
/* Set the MTU on the HW interface */
clib_error_t *vnet_hw_interface_set_mtu (vnet_main_t *vnm, u32 hw_if_index,
u32 mtu);