[EVERFLOW][ACL_ATBLE] Fix for everflow ACL_TABLE in config_db not having the routed ports when no -ASIC in the asic_port_name (#13532)

Why I did it
After the renaming of the asic_port_name in port_config.ini file (PR: #13053 ), the asic_ifname in port_config.ini is changed from '-ASIC<asic_id>' to just port. Example: 'Eth0-ASIC0' to 'Eth0'.

However, with this change a config_db generated via config load_minigraph would cause the EVERFLOW and EVERFLOWV6 tables under ACL_TABLE to not have any of non-LAG front panel interfaces. This was causing the EVERFLOW suite to fail.

How I did it
In parse_asic_external_neigbhors in minigraph.py there was a check that the asic_name.lower() (like asic0) is present in the port_alias_asic_map. However with -ASIC removed from the asic_ifname, the port_alias_asic_map would not have the asic_name and thus any non-LAG neighbor would not be included.

Fix was the ignore the asic name change as the port_alias_asic_map is already only looking for ports in just the same asic as asic_name.

How to verify it
Execute "config load_minigraph" with the mingraph which is generated by sonic-mgmt gen-minigraph script. And confirm ono-lag interface are present in the Everfloe table in the config_dbs.

Signed-off-by: mlok <marty.lok@nokia.com>
This commit is contained in:
Marty Y. Lok 2023-03-13 13:58:32 -04:00 committed by GitHub
parent 5f4d063506
commit 836d65d616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,15 +333,13 @@ def parse_asic_external_link(link, asic_name, hostname):
# if chassis internal is false, the interface name will be # if chassis internal is false, the interface name will be
# interface alias which should be converted to asic port name # interface alias which should be converted to asic port name
if (enddevice.lower() == hostname.lower()): if (enddevice.lower() == hostname.lower()):
if ((endport in port_alias_asic_map) and if endport in port_alias_asic_map:
(asic_name.lower() in port_alias_asic_map[endport].lower())):
endport = port_alias_asic_map[endport] endport = port_alias_asic_map[endport]
neighbors[port_alias_map[endport]] = {'name': startdevice, 'port': startport} neighbors[port_alias_map[endport]] = {'name': startdevice, 'port': startport}
if bandwidth: if bandwidth:
port_speeds[port_alias_map[endport]] = bandwidth port_speeds[port_alias_map[endport]] = bandwidth
elif (startdevice.lower() == hostname.lower()): elif (startdevice.lower() == hostname.lower()):
if ((startport in port_alias_asic_map) and if startport in port_alias_asic_map:
(asic_name.lower() in port_alias_asic_map[startport].lower())):
startport = port_alias_asic_map[startport] startport = port_alias_asic_map[startport]
neighbors[port_alias_map[startport]] = {'name': enddevice, 'port': endport} neighbors[port_alias_map[startport]] = {'name': enddevice, 'port': endport}
if bandwidth: if bandwidth: