Skip to content

DP-1.16.3: MPLS swap action code fix#5344

Open
karthikeya-remilla wants to merge 10 commits intoopenconfig:mainfrom
b4firex:cixia/DP-1.16.3
Open

DP-1.16.3: MPLS swap action code fix#5344
karthikeya-remilla wants to merge 10 commits intoopenconfig:mainfrom
b4firex:cixia/DP-1.16.3

Conversation

@karthikeya-remilla
Copy link
Copy Markdown
Contributor

Code changes to add the missing MPLS-specific plumbing needed to validate ingress classification and rewrite for MPLS traffic.

Diff:

  1. Added MPLS classifier coverage to ingress_traffic_classification_and_rewrite_test:
    • defined MPLS EXP-based classifier terms
    • attached the MPLS input classifier on the ingress interface
    • added MPLS remark handling via set-mpls-tc
  2. Updated the DP-1.16.3 flow to exercise MPLS swap behavior with the correct DUT interface context.
  3. Added Cisco-specific MPLS static support:
    • new metadata deviation enable_mpls_static_on_interface
    • Cisco platform exception in test metadata
    • deviation accessor in internal/deviations
    • Cisco CLI add/remove handling for static MPLS swap LSPs in internal/cfgplugins/mpls.go

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements necessary MPLS-specific plumbing to validate ingress classification and rewrite functionality for MPLS traffic. It enhances the existing QoS test suite by adding MPLS classifier support and updates the flow testing logic to ensure correct DUT interface interaction, specifically addressing requirements for Cisco platforms through new metadata deviations and CLI configuration plugins.

Highlights

  • MPLS Classifier Coverage: Added MPLS EXP-based classifier terms, attached the MPLS input classifier to the ingress interface, and implemented MPLS remark handling using set-mpls-tc.
  • Flow Updates: Updated the DP-1.16.3 flow to properly exercise MPLS swap behavior with the correct DUT interface context.
  • Cisco-Specific MPLS Support: Introduced metadata deviations for MPLS static support, added Cisco platform exceptions, and implemented CLI handling for static MPLS swap LSPs in the configuration plugins.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces MPLS EXP-based traffic classification and remarking for QoS tests, adding support for Cisco devices through new deviations and CLI-based static MPLS configurations. Key updates include refactoring rewriteMplsSwapAction into a table-driven test and modifying ConfigureQoS to handle MPLS traffic classes. Review feedback recommends using t.Skip() instead of commenting out test cases, ensuring interface-level configurations are cleaned up to maintain test isolation, and refining the logic to prevent the creation of empty remark containers. Additionally, the reviewer suggested maintaining CLI string consistency and addressing a version mismatch in the generated protobuf code.

Comment thread internal/cfgplugins/mpls.go
Comment thread proto/metadata_go_proto/metadata.pb.go Outdated
@karthikeya-remilla
Copy link
Copy Markdown
Contributor Author

Team, in the original code I see that all classifier terms are configured that could match all EXP values per README, but only 1 value of EXP is being sent for verification in traffic flows. In my diff, 2 values are being sent.

Ideally, to fully satisfy the intent for MPLS classification+rewrite, shouldn't we send traffic for: 0,1,2,3,4,5,6,7 and expect remark outputs: 0,1,2,3,4,4,6,6 to exercise all of the classes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants