Skip to content

Add queue DLR deleted packets and bytes stats#2280

Open
msherif1234 wants to merge 1 commit into
opencomputeproject:masterfrom
msherif1234:queue_flush_stats
Open

Add queue DLR deleted packets and bytes stats#2280
msherif1234 wants to merge 1 commit into
opencomputeproject:masterfrom
msherif1234:queue_flush_stats

Conversation

@msherif1234

@msherif1234 msherif1234 commented Apr 27, 2026

Copy link
Copy Markdown

Add PFC DLR deleted packets and bytes statistics to SAI queue attributes

Description:

This PR introduces two new SAI queue statistics attributes to support Priority Flow Control (PFC) Deadlock Recovery (DLR) diagnostics:

SAI_QUEUE_STAT_PFC_DLR_DELETED_PACKETS
SAI_QUEUE_STAT_PFC_DLR_DELETED_BYTES

Purpose

When PFC DLR is enabled with SAI_PACKET_ACTION_DROP, these statistics track packets and bytes that are deleted during deadlock recovery operations. This provides essential visibility into traffic management behavior during PFC deadlock scenarios.

Rationale

These attributes follow the existing pattern established by SAI_QUEUE_STAT_CREDIT_WD_DELETED_PACKETS and complement the credit watchdog statistics by providing comprehensive deleted traffic metrics for PFC DLR operations.

Benefits

  • Enhanced Diagnostics: Enables network operators to monitor and analyze PFC deadlock recovery effectiveness
  • Traffic Management: Provides granular visibility into deleted traffic during congestion management
  • Consistency: Maintains alignment with existing queue statistics patterns

@kcudnik

kcudnik commented May 5, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@kcudnik

kcudnik commented May 5, 2026

Copy link
Copy Markdown
Collaborator

since you changed enums names you need to squash and force push to this branch

@msherif1234 msherif1234 force-pushed the queue_flush_stats branch from cbee6e6 to 317d6b0 Compare May 6, 2026 11:48
@tjchadaga

Copy link
Copy Markdown
Collaborator

@msherif1234 - are you able to have a quick discussion of this PR in the SAI community meeting on 5/7?

@tjchadaga

Copy link
Copy Markdown
Collaborator

@msherif1234

Copy link
Copy Markdown
Author

@msherif1234 - are you able to have a quick discussion of this PR in the SAI community meeting on 5/7?

Hi @tjchadaga sure I will join today meeting

Thank you!!

@msherif1234 msherif1234 changed the title Add queue flush packets and bytes stats Add queue flushed packets and bytes stats May 7, 2026
@tjchadaga

Copy link
Copy Markdown
Collaborator

@msherif1234

msherif1234 commented May 7, 2026

Copy link
Copy Markdown
Author

@JaiOCP can you please checkout the latest update and let me know if you have any more comments or feedback ?

@msherif1234

Copy link
Copy Markdown
Author

@mthatty

@tjchadaga tjchadaga added the reviewed PR is discussed in SAI Meeting label May 7, 2026
Signed-off-by: Mohamed S. Mahmoud <mmahmoud2201@gmail.com>
@msherif1234 msherif1234 changed the title Add queue flushed packets and bytes stats Add queue DLR deleted packets and bytes stats May 19, 2026
@msherif1234

Copy link
Copy Markdown
Author

@j-bos

@kcudnik

kcudnik commented May 19, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

Comment thread inc/saiqueue.h
SAI_QUEUE_STAT_TX_TRIM_PACKETS = 0x0000002e,

/** Get packets deleted from a queue when PFC Deadlock Recovery is triggered with SAI_PACKET_ACTION_DROP [uint64_t] */
SAI_QUEUE_STAT_PFC_DLR_DELETED_PACKETS = 0x0000002f,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msherif1234 shall we name them dropped instead of deleted ? Also, will this count packets dropped

  1. if SW based recovery happens and acl drops the packets on port, egress queue
  2. if HW based recovery happens and HW drops packets on port, egress queue

@msherif1234 msherif1234 Jun 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we tried to use deleted instead of dropped to align with an existing similar field as stated in the PR description.
for either sw/hw recovery this will count the dropped packets and its orthogonal to acl drops

@msherif1234 msherif1234 requested a review from vmittal-msft June 18, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed PR is discussed in SAI Meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants