Skip to content

[dash-p4] Add ENI mode and trusted vni stage #672

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

Merged
merged 7 commits into from
Apr 17, 2025
Merged

Conversation

jimmyzhai
Copy link
Collaborator

@jimmyzhai jimmyzhai commented Mar 22, 2025

Referring to sonic-net/SONiC#1911 and #665, to support FNIC pipeline, this PR adds the followings:

  • ENI mode VM, FNIC
  • ENI drop counter eni_trusted_vni_entry_miss_drop
  • Action set_inbound_direction is not defaultonly at table direction_lookup
  • table global_trusted_vni and eni_trusted_vni

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@jimmyzhai jimmyzhai marked this pull request as ready for review March 22, 2025 14:29
@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@jimmyzhai jimmyzhai requested a review from r12f April 1, 2025 06:12
@@ -16,6 +16,10 @@ sai_apis:
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will be great to update the title to cover all changes in this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@@ -134,6 +137,9 @@ control dash_eni_stage(
if (!eni.apply().hit) {
UPDATE_COUNTER(eni_miss_drop, 0);
}
else if (meta.eni_data.eni_mode == dash_eni_mode_t.FNIC) {
trusted_vni_stage.apply(hdr, meta);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one should be in global, shared by all ENIs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

}

@SaiTable[single_match_priority = "true", api = "dash_trusted_vni"]
table trusted_vni {
Copy link
Collaborator

Choose a reason for hiding this comment

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

eni_trusted_vni

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

{
action permit() {}

action deny() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

iirc, we have a global deny function and maybe we can use that instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use global deny function

return;
}

trusted_vni.apply();
Copy link
Collaborator

Choose a reason for hiding this comment

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

need counter to track the drops.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add counter eni_trusted_vni_entry_miss_drop

@jimmyzhai jimmyzhai changed the title [dash-p4] Add ENI mode [dash-p4] Add ENI mode and trusted vni stage Apr 1, 2025
@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

}
}

@SaiTable[single_match_priority = "true", api = "dash_trusted_vni"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add order.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added

@@ -278,6 +277,7 @@ control dash_ingress(
(meta.flow_sync_state == dash_flow_sync_state_t.FLOW_MISS &&
hdr.packet_meta.packet_source == dash_packet_source_t.EXTERNAL))
{
trusted_vni_stage.apply(hdr, meta);
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we missed the inbound routing table for the VNI matching, if we simply return it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add a TODO comment and will revisit it after inbound routing HLD done.

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

return;
}

if (!eni_trusted_vni.apply().hit) {
Copy link
Collaborator

@r12f r12f Apr 9, 2025

Choose a reason for hiding this comment

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

better add a TODO comment to make sure the pipeline can capture the behavior right.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have added TODO comment before trusted_vni_stage.apply(hdr, meta).

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@mssonicbld
Copy link

/azp run

Copy link

Commenter does not have sufficient privileges for PR 672 in repo sonic-net/DASH

@r12f r12f merged commit 30d4ead into sonic-net:main Apr 17, 2025
4 checks passed
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.

4 participants