Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packet trimming API #2077

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marian-pritsak
Copy link
Contributor

When a packet is lost, it can be recovered through fast retransmission (e.g., Go-Back-N in RoCE) or by using timeouts. Retransmission triggered by timeouts typically incurs significant latency. Packet trimming aims to facilitate rapid packet loss notification and, consequently, eliminate slow timeout-based retransmissions.

When a packet is lost, it can be recovered through fast retransmission (e.g., Go-Back-N in RoCE) or by using timeouts. Retransmission triggered by timeouts typically incurs significant latency. Packet trimming aims to facilitate rapid packet loss notification and, consequently, eliminate slow timeout-based retransmissions.

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@marian-pritsak marian-pritsak changed the title Add packet trimming API (#7) Add packet trimming API Sep 19, 2024
* Try sending a shortened packet over a different
* queue.
*/
SAI_BUFFER_PROFILE_PACKET_ADMISSION_FAIL_ACTION_TRIM = 0x00000001,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

drop and trim

Copy link
Contributor Author

@marian-pritsak marian-pritsak Sep 19, 2024

Choose a reason for hiding this comment

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

And counter behavior needs to be explained

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add counter for trimmed packets

* @flags CREATE_AND_SET
* @default 0
*/
SAI_SWITCH_ATTR_PACKET_TRIMMING_DSCP_VALUE,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should DSCP and QUEUE_INDEX be on a more granular level like on every buffer profile or port?

/**
* @brief Disable packet trimming for a given match condition.
*
* This rule takes effect only when packet trimming is configured on a TC to which a packet belongs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change "configured on a TC" to "configured on a buffer profile".

/**
* @brief Disable packet trimming for a given match condition.
*
* This rule takes effect only when packet trimming is configured on a TC to which a packet belongs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be "TC" or "buffer profile"?

* @flags CREATE_AND_SET
* @default 0
*/
SAI_SWITCH_ATTR_PACKET_TRIMMING_QUEUE_INDEX,

Choose a reason for hiding this comment

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

What is expected behavior if TRIMMING_QUEUE experiences congestion ?

@rlhui rlhui added the reviewed PR is discussed in SAI Meeting label Sep 19, 2024
* @flags CREATE_AND_SET
* @default 0
*/
SAI_SWITCH_ATTR_PACKET_TRIMMING_QUEUE_INDEX,

Choose a reason for hiding this comment

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

If SAI_SWITCH_ATTR_QOS_DSCP_TO_TC_MAP, SAI_SWITCH_ATTR_QOS_TC_AND_COLOR_TO_DSCP_MAP, SAI_SWITCH_ATTR_PACKET_TRIMMING_DSCP_VALUE and SAI_SWITCH_ATTR_PACKET_TRIMMING_QUEUE_INDEX are all configured and if there are any conflicts between these configuration, what is the expected behavior ?
Different ASICs might want to resolve this in different ways

@helloanandhi
Copy link

Can you also add the spec you are referring for this trimming feature ?

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