Skip to content

Conversation

@stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Oct 20, 2025

Check mirror capability before configuring it or setting it to SAI

  1. Switch orchagent fetches the mirror capabilities from SAI during initialization and exposes to field PORT_INGRESS_MIRROR_CAPABLE and PORT_EGRESS_MIRROR_CAPABLE in STATE_DB table SWITCH_CAPABILITY.
  2. Mirror orchagent check whether the direction is supported before calling the corresponding SAI API.
  3. CLI checks the capability in PORT_INGRESS_MIRROR_CAPABLE and PORT_EGRESS_MIRROR_CAPABLE in STATE_DB table SWITCH_CAPABILITY before conifiguring CONFIG_DB

Implementation PRs

Module PR title state
sonic-swss Support checking capabilities of the mirror GitHub issue/pull request detail
sonic-utilities Fetch capability of mirror before configuring it GitHub issue/pull request detail

Signed-off-by: Stephen Sun [email protected]

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@stephenxs stephenxs changed the title Check mirror capability before configuring it or setting it to SAI Check mirror ingress/egress capability before configuring it or setting it to SAI Oct 20, 2025
Signed-off-by: Stephen Sun <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@bingwang-ms
Copy link
Contributor

@stephenxs Can you help me understand why do we need this change since we already have switch level capability check?

redis-cli -n 6 hgetall "ACL_STAGE_CAPABILITY_TABLE|EGRESS"
1) "is_action_list_mandatory"
2) "false"
3) "action_list"
4) "PACKET_ACTION,MIRROR_EGRESS_ACTION"
5) "supported_L3V4V6"
6) "false"

@stephenxs
Copy link
Collaborator Author

@stephenxs Can you help me understand why do we need this change since we already have switch level capability check?


redis-cli -n 6 hgetall "ACL_STAGE_CAPABILITY_TABLE|EGRESS"

1) "is_action_list_mandatory"

2) "false"

3) "action_list"

4) "PACKET_ACTION,MIRROR_EGRESS_ACTION"

5) "supported_L3V4V6"

6) "false"

Hi @bingwang-ms
This is ACL based mirror
What we did is for the port mirror

@stephenxs stephenxs requested a review from bingwang-ms October 24, 2025 06:08
@liat-grozovik
Copy link
Collaborator

@bingwang-ms , @prsunny are we good to go?
Will you be able to provide feedback on the PRs as well or can you assign someone on your behalf?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants