Skip to content

Bug: SRv6 MySID entries are not reconciled during warmboot #28754

Description

@nazariig

Is it platform specific

generic

Importance or Severity

Critical

Description of the bug

During warmboot, syncd fails to reconcile SRv6 MySID entries (SAI_OBJECT_TYPE_MY_SID_ENTRY).
Existing MySID objects programmed before the reboot are not matched between the temporary
and current ASIC views, so warmboot tears them down / recreates them (or hits unsupported
object-type paths) instead of preserving them via best-candidate matching.

Investigation and suspected root cause

During warmboot, syncd builds two ASIC views and reconciles them:

  • current view — objects present in the ASIC after reboot (from ASIC dump)
  • temporary view — objects expected by orchagent (from Redis)

For non-object-id entry types (route, NAT, inseg, …), matching is not a simple OID compare.
The entry key itself embeds other VIDs (e.g. virtual router). Those VIDs differ between the
temporary and current views, so syncd must translate them via the RID map before it can
look the entry up.

SAI_OBJECT_TYPE_MY_SID_ENTRY was never wired into that path.

Why MySID needs the same treatment as inseg / route / NAT

A MySID entry key contains switch_id and vr_id VIDs plus the SID and locator lengths:

SAI_OBJECT_TYPE_MY_SID_ENTRY:{switch_id, vr_id, sid, locator_*, function_len, args_len}

After warmboot, the temporary view may have vr_id = 0x3000000000002 while the current
view has the same VR as vr_id = 0x3000000000001, both mapping to the same RID.
Dictionary lookup on the temporary serialized key will miss unless vr_id is rewritten
to the current VID first — exactly the pattern already used for inseg / route / NAT.

Missing wiring in syncd warmboot comparison logic

// syncd/AsicView.h — no dedicated map for MySID
StrObjectIdToSaiObjectHash m_soRoutes;
StrObjectIdToSaiObjectHash m_soNatEntries;
StrObjectIdToSaiObjectHash m_soInsegs;
// m_soMySidEntries missing
StrObjectIdToSaiObjectHash m_soOids;

As a result:

  • AsicView::fromDump / asicCreateObject / asicRemoveObject had no
    m_soMySidEntries map — MySID fell into the unsupported / default branches
  • BestCandidateFinder had no MySID matcher, so warmboot could not reconcile
    existing MySID entries after VID translation
  • ComparisonLogic did not re-serialize the MySID object id after exchanging
    struct VIDs

Warmboot with SRv6 MySID entries programmed therefore fails to match and preserve
those objects (create / remove / throw paths instead of a clean best-candidate match).

Correct approach (same as inseg)

Teach the warmboot comparison path about SAI_OBJECT_TYPE_MY_SID_ENTRY:

  1. AsicView — add m_soMySidEntries; deserialize into it in fromDump;
    maintain it in asicCreateObject / asicRemoveObject
  2. BestCandidateFinder::findCurrentBestMatchForMySidEntry — copy the temporary
    meta key, exchangeTemporaryVidToCurrentVid, serialize, then dictionary-lookup
    in m_soMySidEntries
  3. ComparisonLogic — re-serialize m_str_object_id with
    sai_serialize_my_sid_entry after VID exchange when creating from a temporary object
// BestCandidateFinder — match after VID exchange
sai_object_meta_key_t mk = temporaryObj->m_meta_key;

if (!exchangeTemporaryVidToCurrentVid(mk))
{
    return nullptr;
}

std::string str_my_sid_entry =
    sai_serialize_my_sid_entry(mk.objectkey.key.my_sid_entry);

auto currentMySidIt =
    m_currentView.m_soMySidEntries.find(str_my_sid_entry);

Steps to Reproduce

  1. Program SRv6 MySID entries on a DUT (via orchagent / APPL_DB) so that
    SAI_OBJECT_TYPE_MY_SID_ENTRY objects exist in ASIC_DB / ASIC
  2. Confirm MySID entries are present before reboot
  3. Perform warm-reboot
  4. After warmboot completes, inspect MySID entries and syncd warmboot comparison logs
  5. Observe that MySID entries are not best-candidate matched (recreate / remove /
    unsupported-type behavior instead of a clean preserve)

Actual Behavior and Expected Behavior

Actual Behavior:

During warmboot reconciliation, SAI_OBJECT_TYPE_MY_SID_ENTRY is not tracked in a
dedicated ASIC-view map and has no VID-aware best-candidate matcher. Existing MySID
entries are not matched across temporary vs current views and are not preserved cleanly.

Expected Behavior:

Warmboot reconciles MySID entries the same way as inseg / route / NAT: translate
embedded VIDs via the RID map, dictionary-lookup in m_soMySidEntries, and keep
matching entries without unnecessary tear-down / recreate.

Relevant log output

# During warmboot comparison (illustrative) — MySID not matched / unsupported
# syncd may take create/remove paths for SAI_OBJECT_TYPE_MY_SID_ENTRY
# instead of best-candidate match after vr_id VID exchange

# Temporary view key (example):
# SAI_OBJECT_TYPE_MY_SID_ENTRY:{switch_id=oid:0x2100..., vr_id=oid:0x3000000000002, sid=3000:1:1::, ...}

# Current view key (same RID-backed VR, different VID):
# SAI_OBJECT_TYPE_MY_SID_ENTRY:{switch_id=oid:0x2100..., vr_id=oid:0x3000000000001, sid=3000:1:1::, ...}

# Without VID exchange → dictionary lookup miss → no best match

Output of show version, show techsupport

  • N/A

Attach files (if any)

  • N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions