Skip to content

Commit 1e9a8b7

Browse files
authored
Fix to substract the macsec sectag size from port MTU during InitializePort (sonic-net#2789)
1 parent 98d2b0c commit 1e9a8b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

orchagent/portsorch.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,8 @@ bool PortsOrch::getPortMtu(const Port& port, sai_uint32_t &mtu)
11941194

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

1197-
if (isMACsecPort(port.m_port_id))
1197+
/* Reduce the default MTU got from ASIC by MAX_MACSEC_SECTAG_SIZE */
1198+
if (mtu > MAX_MACSEC_SECTAG_SIZE)
11981199
{
11991200
mtu -= MAX_MACSEC_SECTAG_SIZE;
12001201
}

0 commit comments

Comments
 (0)