Skip to content

Mux recovery when link up comes before ICMP session Active with ICMP Offload#348

Open
harjotsinghpawra wants to merge 1 commit into
sonic-net:masterfrom
harjotsinghpawra:active_up_icmp_hw
Open

Mux recovery when link up comes before ICMP session Active with ICMP Offload#348
harjotsinghpawra wants to merge 1 commit into
sonic-net:masterfrom
harjotsinghpawra:active_up_icmp_hw

Conversation

@harjotsinghpawra

@harjotsinghpawra harjotsinghpawra commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Solving the bug where is icmp hwoffload reports icmp session up before Link Up . When prober goes active first and MUX is Unknown state then Prober is in Wait but mux gets stuck and Mux never recovers, even after Link comes back up.

The transition handler for (Active, Unknown, Up) is LinkProberActiveMuxUnknownLinkUpTransitionFunction. Because ps(mCompositeState) is already Active when the link-up arrives, it takes the else branch and calls startMuxProbeTimer(), which:

  • Calls probeForwardingState() to ask xcvrd for the current forwarding state.
  • Arms mDeadlineTimer; if xcvrd does not respond, it retries with backoff.
  • When xcvrd replies Active, handleProbeMuxStateNotification(Active) drives the final switchMuxState(Active) to orchagent.
Scenario Before fix After fix
ICMP session UP before link UP (HW offload) (P: Active, M: Unknown, L: Down) → link up → (P: Wait, M: Unknown, L: Up) — stuck, no recovery (P: Active, M: Unknown, L: Down) → link up → (P: Active, M: Unknown, L: Up) → xcvrd probe → (P: Active, M: Active, L: Up) — recovered
SW prober or link UP before ICMP session initLinkProberState() runs as before — no change Same, initLinkProberState() runs as before — no change
Prober already Active, mux already Active, link recovers initLinkProberState() resets prober unnecessarily Transition handler sees (Active, Active, Up) — no redundant switchMuxState issued

Issue raised:
sonic-net/sonic-buildimage#26547

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Doc/Design
  • Unit test

Approach

What is the motivation for this PR?

sonic-net/sonic-buildimage#26547
Bug reported

Work item tracking
  • Microsoft ADO (number only):

How did you do it?

Forced it to do get grpc probe for MUX state if link goes from Up from down and prober is in active
then it will do state transition and MUX will resolve itself using grpc.

How did you verify/test it?

Unit test included in patch

Any platform specific information?

Documentation

…offload

Signed-off-by: Harjot Singh <harjotpawrawork@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@harjotsinghpawra harjotsinghpawra changed the title Mux recovery when link up comes before ICMP session Active with ICMP … Mux recovery when link up comes before ICMP session Active with ICMP Offload Jun 25, 2026
@harjotsinghpawra

Copy link
Copy Markdown
Contributor Author

@zjswhhh Please review it if possible.

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.

2 participants