Skip to content

pimd: Keep track of how long the S,G rpt Prune has been around (backport #20576)#20583

Merged
donaldsharp merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-20576
Jan 23, 2026
Merged

pimd: Keep track of how long the S,G rpt Prune has been around (backport #20576)#20583
donaldsharp merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-20576

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 23, 2026

The S,G rpt prune ifchannel was not tracking uptime. Let's do so.


This is an automatic backport of pull request #20576 done by Mergify.

The S,G rpt prune ifchannel was not tracking uptime.  Let's
do so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit d397f86)
@greptile-apps
Copy link

greptile-apps bot commented Jan 23, 2026

Greptile Summary

Added missing uptime tracking for S,G RPT prune ifchannel state transitions. Previously, the ifjoin_creation field was set when transitioning to/from NOINFO state, but wasn't being set when transitioning to PRUNE_PENDING states in two specific scenarios:

  • When transitioning from JOIN to PRUNE_PENDING after receiving a prune message (line 1081)
  • When transitioning from PRUNE_PENDING_TMP to PRUNE_PENDING for RPT-bit prune messages (line 1137)

This change ensures consistent uptime tracking across all relevant state transitions, making the ifjoin_creation timestamp available for display in PIM commands that show interface channel state information.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is a simple backport that adds two identical lines to set the uptime tracking field in state transitions. The change is consistent with existing patterns in the codebase (line 367 shows the same approach), introduces no new logic, and simply ensures completeness of state tracking for monitoring purposes.
  • No files require special attention

Important Files Changed

Filename Overview
pimd/pim_ifchannel.c Added uptime tracking to S,G rpt prune ifchannel state transitions at lines 1081 and 1137

Sequence Diagram

sequenceDiagram
    participant Caller as pim_ifchannel_prune()
    participant Ch as pim_ifchannel (ch)
    participant Timer as Event System
    
    Note over Caller,Ch: Case 1: JOIN -> PRUNE_PENDING
    Caller->>Ch: Receive Prune message
    Ch->>Ch: Set ifjoin_creation = pim_time_monotonic_sec()
    Ch->>Ch: Switch state: JOIN -> PRUNE_PENDING
    Ch->>Timer: Start prune_pending_timer
    
    Note over Caller,Ch: Case 2: PRUNE_PENDING_TMP -> PRUNE_PENDING (RPT bit set)
    Caller->>Ch: Receive Prune message with RPT bit
    Ch->>Ch: Set ifjoin_creation = pim_time_monotonic_sec()
    Ch->>Ch: Set state: PRUNE_PENDING_TMP -> PRUNE_PENDING
    Ch->>Timer: Cancel expiry_timer
    Ch->>Timer: Start new expiry_timer with holdtime
Loading

@greptile-apps
Copy link

greptile-apps bot commented Jan 23, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@donaldsharp donaldsharp merged commit 0673952 into stable/10.5 Jan 23, 2026
21 of 22 checks passed
@ton31337 ton31337 deleted the mergify/bp/stable/10.5/pr-20576 branch January 27, 2026 14:26
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