From df615c4e6cb750cf6a2b3f88d67822d485ecc16f Mon Sep 17 00:00:00 2001 From: "Marty Y. Lok" <76118573+mlok-nokia@users.noreply.github.com> Date: Thu, 11 Nov 2021 18:09:32 -0500 Subject: [PATCH] [Voq][Inband] Support the Ethernet-IB port (#228) Modified init_sync_d_interface_tables() to support the VoQ Inband interface Ethernet-IB port name This commit depends on -- Azure/sonic-py-swsssdk#113 which create the Inband index and name mapping --- src/sonic_ax_impl/mibs/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sonic_ax_impl/mibs/__init__.py b/src/sonic_ax_impl/mibs/__init__.py index a8e94fc2968c..0c3a7dba0e00 100644 --- a/src/sonic_ax_impl/mibs/__init__.py +++ b/src/sonic_ax_impl/mibs/__init__.py @@ -275,7 +275,8 @@ def init_sync_d_interface_tables(db_conn): for if_name, sai_id in if_name_map_util.items(): if_name_str = if_name if (re.match(port_util.SONIC_ETHERNET_RE_PATTERN, if_name_str) or \ - re.match(port_util.SONIC_ETHERNET_BP_RE_PATTERN, if_name_str)): + re.match(port_util.SONIC_ETHERNET_BP_RE_PATTERN, if_name_str) or \ + re.match(port_util.SONIC_ETHERNET_IB_RE_PATTERN, if_name_str)): if_name_map[if_name] = sai_id # As sai_id is not unique in multi-asic platform, concatenate it with # namespace to get a unique key. Assuming that ':' is not present in namespace @@ -283,7 +284,8 @@ def init_sync_d_interface_tables(db_conn): # sai_id_key = namespace : sai_id for sai_id, if_name in if_id_map_util.items(): if (re.match(port_util.SONIC_ETHERNET_RE_PATTERN, if_name) or \ - re.match(port_util.SONIC_ETHERNET_BP_RE_PATTERN, if_name)): + re.match(port_util.SONIC_ETHERNET_BP_RE_PATTERN, if_name) or \ + re.match(port_util.SONIC_ETHERNET_IB_RE_PATTERN, if_name)): if_id_map[get_sai_id_key(db_conn.namespace, sai_id)] = if_name logger.debug("Port name map:\n" + pprint.pformat(if_name_map, indent=2)) logger.debug("Interface name map:\n" + pprint.pformat(if_id_map, indent=2))