Skip to content

[Cisco][G200/G202x] MoD related fixes for Tajo#1205

Open
itskittycisco wants to merge 1 commit into
facebook:mainfrom
itskittycisco:mod_tajo_fixes
Open

[Cisco][G200/G202x] MoD related fixes for Tajo#1205
itskittycisco wants to merge 1 commit into
facebook:mainfrom
itskittycisco:mod_tajo_fixes

Conversation

@itskittycisco
Copy link
Copy Markdown

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run
    clang-format.............................................................Passed
    shellcheck...........................................(no files to check)Skipped
    shfmt................................................(no files to check)Skipped
    trim trailing whitespace.................................................Passed
    fix end of files.........................................................Passed
    check yaml...........................................(no files to check)Skipped
    check json...........................................(no files to check)Skipped
    check for merge conflicts................................................Passed
    ruff check...........................................(no files to check)Skipped
    ruff format..........................................(no files to check)Skipped
    Prevent sai_impl in fboss manifest.......................................Passed

Summary

1. On Tajo, `SAI_TAM_TRANSPORT_ATTR_SRC_MAC_ADDRESS` and `DST_MAC_ADDRESS` are unsupported (`optionalExtensionAttributeId() == nullopt`), but code attempted to instantiate extension attributes unconditionally, causing a hard check failure id.has_value() Fix is to build `SrcMacAddress` and `DstMacAddress` as optional extension attributes.
2. SDK requires `SAI_TAM_EVENT_ATTR_THRESHOLD` for `SAI_TAM_EVENT_TYPE_PACKET_DROP`. If not set, we get - `Failed to create sai entity TamEvent...: MANDATORY ATTRIBUTE MISSING`. Fix is to always create a SaiTamEventThreshold object for the packet-drop event path. 
3. Tajo tear down fixes. For `TAJO_SAI_SDK` teardown path, clear TAM bindings using empty lists: `switchManager_->setTamObject({})`, `portManager_->setTamObject(portId, {})`instead of reset helpers that set `SAI_NULL_OBJECT_ID` list entries.
4. Tear down ordering fix to avoid "OBJECT IN USE" error 
Before `tamManager_.reset()` in Tajo path, 1. clear switch TAM object list
2. clear TAM object list on all MoD egress ports returned by `getAllMirrorOnDropPortIds()`then reset TAM manager.

Test Plan

Executed the following MoD tests to ensure that the setup and teardown is successful:
• AgentMirrorOnDropStatelessTest.DefaultRouteDrop
• AgentMirrorOnDropStatelessTest.AclDrop
• AgentMirrorOnDropStatelessTest.MmuDrop
• AgentMirrorOnDropStatelessWarmbootTest.WarmbootEnableSampling
• AgentMirrorOnDropStatelessWarmbootTest.WarmbootDisableSampling

@itskittycisco itskittycisco requested a review from a team as a code owner May 19, 2026 00:14
@meta-cla meta-cla Bot added the CLA Signed label May 19, 2026
@github-actions github-actions Bot added the cisco label May 19, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 19, 2026

@sayeedt has imported this pull request. If you are a Meta employee, you can view this in D105705587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant