-
Notifications
You must be signed in to change notification settings - Fork 245
P4RT ACL and gRIBI interaction #5987
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
Open
rohit-rp
wants to merge
2
commits into
openconfig:main
Choose a base branch
from
rohit-rp:p4rt_acl_gribi_interaction
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
feature/p4rt/otg_tests/p4rt_acl_gribi_interaction_test/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| # TE-1.3: P4RT ACL Interaction with gRIBI Forwarding | ||
|
|
||
| ## Summary | ||
|
|
||
| This test verifies the predictable behavior of the data plane when a packet is | ||
| matched by both a P4RT-programmed table entry (such as an ACL) and a | ||
| gRIBI-programmed route. The test ensures that the actual packet treatment | ||
| conforms to the expected vendor-documented pipeline order (e.g., P4RT ACL | ||
| taking precedence over gRIBI L3 lookup), and that the interaction is consistent | ||
| and stable. | ||
|
|
||
| ## Testbed type | ||
|
|
||
| * [`TESTBED_DUT_ATE_2_LINKS`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed) | ||
|
|
||
| ## Procedure | ||
|
|
||
| ### Test environment setup | ||
|
|
||
| * Configure two interfaces on the DUT connected to ATE port 1 and ATE port 2. | ||
| * ATE port 1 IP: `192.0.2.2/30` | ||
| * DUT port 1 IP: `192.0.2.1/30` | ||
| * ATE port 2 IP: `192.0.2.6/30` | ||
| * DUT port 2 IP: `192.0.2.5/30` | ||
| * Bring up the interfaces and verify they are `UP` using telemetry `/interfaces/interface/state/oper-status`. | ||
| * Establish gRIBI and P4RT client connections to the DUT. | ||
|
|
||
| ### TE-1.3.1 - Baseline gRIBI Forwarding | ||
|
|
||
| * Step 1 - Program a gRIBI route | ||
| * Program a gRIBI IPv4 route in network instance `DEFAULT` for destination prefix `198.51.100.0/24`. | ||
| * Create a Next-Hop Group pointing to a Next-Hop with IP `192.0.2.6` (ATE port 2). | ||
| * Validate route installation using `gNMI.Subscribe` (ON_CHANGE) or `gNMI.Get` on paths: | ||
| * `/network-instances/network-instance[name=DEFAULT]/afts/ipv4-unicast/ipv4-entry[prefix=198.51.100.0/24]/state/prefix` | ||
| * `/network-instances/network-instance[name=DEFAULT]/afts/ipv4-unicast/ipv4-entry[prefix=198.51.100.0/24]/state/next-hop-group` | ||
|
|
||
| * Step 2 - Send Traffic | ||
| * Send IPv4 traffic from ATE port 1 to destination IP `198.51.100.1`. | ||
| * Send IPv4 traffic from ATE port 1 to destination IP `198.51.100.2`. | ||
| * Verify 0% packet loss for both streams to confirm baseline gRIBI forwarding is active. | ||
|
|
||
| ### TE-1.3.2 - P4RT ACL Drop action takes precedence over gRIBI Forwarding | ||
|
|
||
| * Step 1 - Program a P4RT ACL rule | ||
| * Program a P4RT IPv4 ACL rule that matches destination IP `198.51.100.1/32` with action `DROP`. | ||
| * Validate the P4RT ACL installation by ensuring a successful P4RT `WriteResponse` is received. | ||
|
|
||
| * Step 2 - Send Traffic | ||
| * Send test stream: IPv4 traffic from ATE port 1 to destination IP `198.51.100.1` (matching both the gRIBI route and the P4RT ACL). | ||
| * Send control stream: IPv4 traffic from ATE port 1 to destination IP `198.51.100.2` (matching only the gRIBI route). | ||
|
|
||
| * Step 3 - Validation with pass/fail criteria | ||
| * Verify traffic to `198.51.100.1` is dropped (>99% loss is pass) as the P4RT ACL takes precedence. | ||
| * Verify traffic to `198.51.100.2` is forwarded correctly to ATE port 2 (0% loss is pass) preventing false positives. | ||
|
|
||
| ### TE-1.3.3 - Scaled gRIBI and P4RT ACL Interaction | ||
|
|
||
| * Step 1 - Program Scaled routes and ACLs | ||
| * Program 1,000 gRIBI IPv4 routes (e.g., `10.0.0.0/24` through `10.3.231.0/24`) with next-hop pointing to ATE port 2. | ||
| * Verify all 1,000 routes are programmed via telemetry using `gNMI.Get` on AFT state. | ||
| * Program 1,000 P4RT IPv4 ACL rules matching specific host IPs within each of those routes (e.g., `10.x.y.1/32`) with action `DROP`. | ||
| * Validate installation via P4RT `WriteResponse`. | ||
|
|
||
| * Step 2 - Send Traffic | ||
| * Send traffic streams to the 1,000 matched host IPs. | ||
| * Send traffic streams to 1,000 unmatched host IPs within the routed subnets. | ||
|
|
||
| * Step 3 - Validation with pass/fail criteria | ||
| * Verify traffic to the matched host IPs is dropped (>99% loss is pass). | ||
| * Verify traffic to the unmatched host IPs is forwarded (0% loss is pass). | ||
|
|
||
| ### TE-1.3.4 - Reverting P4RT ACL restores gRIBI forwarding | ||
|
|
||
| * Step 1 - Delete P4RT ACL rule | ||
| * Delete the P4RT IPv4 ACL rule matching `198.51.100.1/32` (configured in TE-1.3.2). | ||
| * Validate deletion via P4RT `WriteResponse`. | ||
|
|
||
| * Step 2 - Send Traffic | ||
| * Send traffic from ATE port 1 to destination IP `198.51.100.1`. | ||
|
|
||
| * Step 3 - Validation with pass/fail criteria | ||
| * Verify traffic to `198.51.100.1` is forwarded correctly to ATE port 2 (0% loss is pass), confirming traffic falls back to the gRIBI route. | ||
|
|
||
| ### TE-1.3.5 - Removal of gRIBI route with active P4RT ACL | ||
|
|
||
| * Step 1 - Delete gRIBI route | ||
| * Re-program the P4RT IPv4 ACL rule matching `198.51.100.1/32` with action `DROP`. | ||
| * Delete the gRIBI IPv4 route for destination prefix `198.51.100.0/24`. | ||
| * Validate route deletion via telemetry ensuring the prefix is removed from the AFT state. | ||
|
|
||
| * Step 2 - Send Traffic | ||
| * Send test stream: traffic from ATE port 1 to destination IP `198.51.100.1` (matches active P4RT ACL). | ||
| * Send control stream: traffic from ATE port 1 to destination IP `198.51.100.2` (no matching route). | ||
|
|
||
| * Step 3 - Validation with pass/fail criteria | ||
| * Verify traffic to `198.51.100.1` is dropped (>99% loss is pass) as it matches the P4RT ACL. | ||
| * Verify traffic to `198.51.100.2` is dropped (>99% loss is pass) because there is no route. | ||
|
|
||
| #### Canonical OC | ||
|
|
||
| ```json | ||
| { | ||
| "network-instances": { | ||
| "network-instance": [ | ||
| { | ||
| "name": "DEFAULT", | ||
| "config": { | ||
| "name": "DEFAULT" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## OpenConfig Path and RPC Coverage | ||
|
|
||
| ```yaml | ||
| paths: | ||
| /interfaces/interface/state/oper-status: | ||
| /interfaces/interface/config/enabled: | ||
| /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix: | ||
| /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group: | ||
| /network-instances/network-instance/config/name: | ||
|
|
||
| rpcs: | ||
| gnmi: | ||
| gNMI.Set: | ||
| union_replace: true | ||
| gNMI.Subscribe: | ||
| on_change: true | ||
| ``` | ||
|
|
||
| ## Required DUT platform | ||
|
|
||
| * FFF | ||
|
rohit-rp marked this conversation as resolved.
|
||
7 changes: 7 additions & 0 deletions
7
feature/p4rt/otg_tests/p4rt_acl_gribi_interaction_test/metadata.textproto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto | ||
| # proto-message: Metadata | ||
|
|
||
| uuid: "4dd0a06c-e160-4810-b00c-4711fd2d6117" | ||
| plan_id: "TE-1.3" | ||
| description: "P4RT ACL Interaction with gRIBI Forwarding" | ||
| testbed: TESTBED_DUT_ATE_2LINKS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.