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

Dropped Packet Notification (MOD) support #1786

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

Conversation

madhupalu
Copy link
Contributor

No description provided.

Copy link
Contributor Author

@madhupalu madhupalu left a comment

Choose a reason for hiding this comment

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

Changes looks good me.
Please add what support needed from Orch agent side to support these API spec. thx

@@ -645,12 +708,15 @@ An sFlowOrch is introduced in the Orchagent to handle configuration requests. Th

Also, it monitors the SFLOW_SESSIONS_TABLE and PORT state to determine sampling rate / speed changes to derive and set the sampling rate for all the interfaces. Ingress/Egress Sampling is enabled on the interfaces based on direction setting. It uses the SAI samplepacket APIs to set each ports's sampling rate.

Finally, sFlowOrch facilitates the creation/deletion of dropped packet sessions as well as get/set of session specific attributes. sFlowOrch sets the genetlink host interface that is to be used by the SAI driver to deliver dropped packet notifications and reason codes.
Copy link
Contributor Author

@madhupalu madhupalu Aug 26, 2024

Choose a reason for hiding this comment

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

@rck-innovium is the existing API's enough or need to extend it orchagent to extend new Mirror-in-drop / SAI API spec 2.0?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Orchagent needs to be extended to invoke the SAI TAM APIs described in [https://github.com/opencomputeproject/SAI/blob/master/doc/TAM/SAI-Proposal-TAM-MOD-Localhost.md#50--api-example SAI Proposal TAM MOD Localhost - API Example]

table_attr[1].value=discard_packet_trap_id; // Object referencing DISCARD packet traps

table_attr[2].id=SAI_HOSTIF_TABLE_ENTRY_ATTR_CHANNEL;
table_attr[2].value=SAI_HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_GENETLINK;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rck-innovium shouldn't be used "events" as MCGRP NAME for drop notifications?
sai_host_if_attr[2].id= SAI_HOSTIF_ATTR_GENETLINK_MCGRP_NAME;
sai_host_if_attr[2].value="events";

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, you are right.

    attr_list[attr_count].id = SAI_HOSTIF_ATTR_GENETLINK_MCGRP_NAME;
    strncpy(attr_list[attr_count].value.chardata, "events", 31);
    attr_list[attr_count].value.chardata[31] = '\0';
    attr_count++;

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