aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-09 06:05:16 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-12 11:23:33 +0000
commitffd78d1ef8fe80d1b756a71d42d5eadda60ae996 (patch)
tree99770e8773a7c3dd27c8b9b116edb6a39ace09ea /src/vnet/interface_api.c
parent2d6f66e1748be190664cbd72c826db32616d759a (diff)
Improve MTU handling
- setting MTU on an interface updates the L3 max bytes too - value cached in the adjacency is also updated - MTU exceeded generates ICMP to sender Change-Id: I343ec71d8e903b529594c4bd0543f04bc7f370b3 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 0541f311bc2..ed116bc88d9 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -98,7 +98,6 @@ vl_api_sw_interface_set_mtu_t_handler (vl_api_sw_interface_set_mtu_t * mp)
{
vl_api_sw_interface_set_mtu_reply_t *rmp;
vnet_main_t *vnm = vnet_get_main ();
- u32 flags = ETHERNET_INTERFACE_FLAG_MTU;
u32 sw_if_index = ntohl (mp->sw_if_index);
u16 mtu = ntohs (mp->mtu);
ethernet_main_t *em = &ethernet_main;
@@ -134,11 +133,7 @@ vl_api_sw_interface_set_mtu_t_handler (vl_api_sw_interface_set_mtu_t * mp)
goto bad_sw_if_index;
}
- if (hi->max_packet_bytes != mtu)
- {
- hi->max_packet_bytes = mtu;
- ethernet_set_flags (vnm, si->hw_if_index, flags);
- }
+ vnet_hw_interface_set_mtu (vnm, si->hw_if_index, mtu);
BAD_SW_IF_INDEX_LABEL;
REPLY_MACRO (VL_API_SW_INTERFACE_SET_MTU_REPLY);