Skip to content

Commit

Permalink
Fix to substract the macsec sectag size from port MTU during Initiali…
Browse files Browse the repository at this point in the history
…zePort (sonic-net#2789)
  • Loading branch information
judyjoseph authored and theasianpianist committed Jul 20, 2023
1 parent 6b25943 commit ae06a11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,8 @@ bool PortsOrch::getPortMtu(const Port& port, sai_uint32_t &mtu)

mtu = attr.value.u32 - (uint32_t)(sizeof(struct ether_header) + FCS_LEN + VLAN_TAG_LEN);

if (isMACsecPort(port.m_port_id))
/* Reduce the default MTU got from ASIC by MAX_MACSEC_SECTAG_SIZE */
if (mtu > MAX_MACSEC_SECTAG_SIZE)
{
mtu -= MAX_MACSEC_SECTAG_SIZE;
}
Expand Down

0 comments on commit ae06a11

Please sign in to comment.