diff --git a/dash-pipeline/SAI/specs/dash_ha.yaml b/dash-pipeline/SAI/specs/dash_ha.yaml index d6809a8b2..d4c27aae9 100644 --- a/dash-pipeline/SAI/specs/dash_ha.yaml +++ b/dash-pipeline/SAI/specs/dash_ha.yaml @@ -128,8 +128,8 @@ sai_apis: is_vlan: false deprecated: false - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute - name: SAI_HA_SET_ATTR_SWITCHOVER_NETWORK_CONVERGENCE_TIME_MS - description: Action parameter switchover network convergence time ms + name: SAI_HA_SET_ATTR_DPU_DRIVEN_HA_SWITCHOVER_WAIT_TIME_MS + description: Action parameter SAI vendor driven HA switchover wait time ms type: sai_uint32_t attr_value_field: u32 default: '0' diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_spec_utils.py b/dash-pipeline/SAI/utils/sai_spec/sai_spec_utils.py index 547af456e..daf0d465b 100644 --- a/dash-pipeline/SAI/utils/sai_spec/sai_spec_utils.py +++ b/dash-pipeline/SAI/utils/sai_spec/sai_spec_utils.py @@ -23,7 +23,8 @@ def load_word_fixers() -> None: "resimulation": "re-simulation", "pb": "protocol buffer", "proto": "protocol", - "smac": "source MAC" + "smac": "source MAC", + "dpu": "DPU" } # Load all SAI acronyms @@ -31,7 +32,7 @@ def load_word_fixers() -> None: for line in f: word = line.split('-')[0].strip().lower() word_fixers[word] = word.upper() - + # More command word fixers def normalize_sai_comment(s: str) -> str: @@ -40,9 +41,11 @@ def normalize_sai_comment(s: str) -> str: """ if len(word_fixers) == 0: load_word_fixers() - + words = [word if word.lower() not in word_fixers else word_fixers[word.lower()] for word in s.split()] - return " ".join(words) + s = " ".join(words) + # temporary workaround until "DPU" is added to SAI meta acronyms + return s.replace("DPU driven HA ", "SAI vendor driven HA ") def merge_sai_value_lists( target: List[Any], @@ -62,19 +65,19 @@ def merge_sai_value_lists( it will not be removed from the old list. """ target_dict = {get_key(item): item for item in target} - + source_keys = set() for source_item in source: source_key = get_key(source_item) source_keys.add(source_key) - + if source_key in target_dict: target_item = target_dict[source_key] on_conflict(target_item, source_item) else: target.append(source_item) target_dict[source_key] = source_item - + # Remove all items in target, if its key doesn't exist in source_keys and on_deprecate returns True. target[:] = [item for item in target if get_key(item) in source_keys or not on_deprecate(item)] diff --git a/dash-pipeline/bmv2/stages/ha.p4 b/dash-pipeline/bmv2/stages/ha.p4 index 54e037524..940469cb6 100644 --- a/dash-pipeline/bmv2/stages/ha.p4 +++ b/dash-pipeline/bmv2/stages/ha.p4 @@ -71,7 +71,7 @@ control ha_stage(inout headers_t hdr, bit<32> dp_channel_probe_interval_ms, bit<32> dp_channel_probe_fail_threshold, @SaiVal[isreadonly="true"] bit<1> dp_channel_is_alive, - bit<32> switchover_network_convergence_time_ms + bit<32> dpu_driven_ha_switchover_wait_time_ms ) { meta.ha.peer_ip_is_v6 = peer_ip_is_v6; meta.ha.peer_ip = peer_ip;