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 (#2789)
  • Loading branch information
judyjoseph authored May 31, 2023
1 parent 98d2b0c commit 1e9a8b7
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 @@ -1194,7 +1194,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 1e9a8b7

Please sign in to comment.