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

DP-2.4 Police traffic on input interface matching all packets using 1 rate, 2 color marker. #3385

Merged
merged 23 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e71e255
move policer from te-18.1 to new test
dplore Aug 19, 2024
2aa6e7f
test registry
dplore Aug 19, 2024
937f87e
est case for vanilla policier per interface/sub-interface support
vishnureddybadveli Aug 19, 2024
31dbd24
Test case for vanilla policier per interface/sub-interface support
vishnureddybadveli Aug 19, 2024
9e48263
.DS_Store banished!
vishnureddybadveli Aug 19, 2024
48bcce4
Added classifier by input mac path
vishnureddybadveli Aug 20, 2024
7c4d8e0
Update testregistry.textproto
vishnureddybadveli Aug 20, 2024
fc6647f
Move classifier and schedular by destination mac to a new directory
vishnureddybadveli Aug 21, 2024
7d75db2
Update feature/qos/otg_tests/ingress_police_mac_vlan/README.md
vishnureddybadveli Aug 21, 2024
ae2cca9
Update README.md
vishnureddybadveli Oct 2, 2024
014029d
Removed the classifier config
vishnureddybadveli Oct 2, 2024
a4327d9
Renamed the directory
vishnureddybadveli Oct 3, 2024
fd361c6
Delete README.md
vishnureddybadveli Oct 3, 2024
5281cbd
Delete README.md
vishnureddybadveli Oct 3, 2024
2dd2b94
Renamed TE-18.4 to DP-2.4
vishnureddybadveli Oct 8, 2024
201a735
Update README.md
vishnureddybadveli Oct 8, 2024
7e772e0
Delete feature/qos/otg_tests/ingress_police_mac_vlan/README.md
vishnureddybadveli Oct 8, 2024
c0b843c
Update README.md
vishnureddybadveli Oct 9, 2024
c824ad8
Update testregistry.textproto
vishnureddybadveli Oct 9, 2024
48ea76b
Merge branch 'main' into dplore/qos-in-police-nhg
dplore Oct 10, 2024
d809ac1
Merge branch 'main' into dplore/qos-in-police-nhg
dplore Oct 10, 2024
98aaa95
.DS_Store banished!
vishnureddybadveli Oct 10, 2024
2c58976
Merge branch 'main' into dplore/qos-in-police-nhg
dplore Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
Binary file not shown.
191 changes: 191 additions & 0 deletions feature/qos/otg_tests/ingress_police_default/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# DP-2.4 Police traffic on input matching all packets using 1 rate, 2 color marker

## Summary

Use the gRIBI applied ip entries from TE-18.1 gRIBI.
Configure an ingress scheduler to police traffic using a 1 rate, 2 color policer and attach the scheduler to the interface without a classifier.
Lack of match conditions will cause all packets to be matched.
Send traffic to validate the policer.

## Topology

* [`featureprofiles/topologies/atedut_2.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed)

## Test setup

Use TE-18.1 test environment setup.

## Procedure

### DP-2.4.1 Generate and push configuration

* Generate config for 2 scheduler polices with an input rate limit.
* Apply scheduler to DUT subinterface with vlan.
* Use gnmi.Replace to push the config to the DUT.

```json
{
"openconfig-qos": {
"scheduler-policies": [
{
"scheduler-policy": null,
"config": {
"name": "limit_1Gb"
},
"schedulers": [
{
"scheduler": null,
"config": {
"sequence": 1,
"type": "ONE_RATE_TWO_COLOR"
},
"inputs": [
{
"input": "my input policer 1Gb",
"config": {
"id": "my input policer 1Gb",
"input-type": "QUEUE",
"queue": "dummy_input_queue_A"
}
}
],
"one-rate-two-color": {
"config": {
"cir": 1000000000,
"bc": 100000,
"queuing-behavior": "POLICE"
},
"exceed-action": {
"config": {
"drop": true
}
}
}
}
]
},
{
"scheduler-policy": null,
"config": {
"name": "limit_2Gb"
},
"schedulers": [
{
"scheduler": null,
"config": {
"sequence": 1,
"type": "ONE_RATE_TWO_COLOR"
},
"inputs": [
{
"input": "my input policer 2Gb",
"config": {
"id": "my input policer 2Gb",
"input-type": "QUEUE",
"queue": "dummy_input_queue_B"
}
}
],
"one-rate-two-color": {
"config": {
"cir": 2000000000,
"bc": 100000,
"queuing-behavior": "POLICE"
},
"exceed-action": {
"config": {
"drop": true
}
}
}
}
]
}
],
#
# Interfaces input are mapped to the desired scheduler.
"interfaces": [
{
"interface": null,
"config": {
"interface-id": "PortChannel1.100"
},
"input": {
"scheduler-policy": {
"config": {
"name": "limit_group_A_1Gb"
}
}
}
},
{
"interface": null,
"config": {
"interface-id": "PortChannel1.200"
},
"input": {
"scheduler-policy": {
"config": {
"name": "limit_group_B_1Gb"
}
}
}
}
]
}
}
```

### DP-2.4.2 Test traffic

* Send traffic
* Send traffic from ATE port 1 to DUT for dest_A and is conforming to cir.
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
* Send traffic from ATE port 1 to DUT for to dest_B and is conforming to
cir.
* Validate qos counters per DUT.
* Validate qos counters by ATE port.
* Validate packets are received by ATE port 2.
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
* Validate outer packet ipv6 flow label assignment
* When the outer packet is IPv6, the flow-label should be inspected on the ATE.
* If the inner packet is IPv4, the outer IPv6 flow label should be computed based on the IPv4 5 tuple src,dst address and ports, plus protocol
* If the inner packet is IPv6, the inner flow label should be copied to the outer packet.
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
* Increase traffic on flow to dest_B to 2Gbps
* Validate that flow dest_B experiences ~50% packet loss (+/- 1%)


#### OpenConfig Path and RPC Coverage

```yaml
paths:
# qos scheduler config
/qos/scheduler-policies/scheduler-policy/config/name:
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config/type:
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/cir:
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/bc:
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config/queuing-behavior:
/qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config/drop:

# qos interfaces config
/qos/interfaces/interface/config/interface-id:
/qos/interfaces/interface/input/scheduler-policy/config/name:

# qos interface scheduler counters
/qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-pkts:
/qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/conforming-octets:
/qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-pkts:
/qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state/exceeding-octets:

rpcs:
gnmi:
gNMI.Set:
union_replace: true
replace: true
gNMI.Subscribe:
on_change: true
```

## Required DUT platform

* FFF


4 changes: 4 additions & 0 deletions testregistry.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,10 @@ test: {
id: "TE-17.1"
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/experimental/gribi/otg_tests/vrf_policy_driven_te/README.md"
}
test: {
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
id: "DP-2.4"
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/qos/otg_tests/ingress_police_nhg/README.md"
}
test: {
id: "TE-2.1"
description: "gRIBI IPv4 Entry"
Expand Down
Loading