Skip to content

Commit

Permalink
change the sequence number and correct typo
Browse files Browse the repository at this point in the history
Signed-off-by: richardyu-ms <[email protected]>
  • Loading branch information
richardyu-ms committed Jun 9, 2022
1 parent d4c2bb9 commit 2bb1ec8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 67 deletions.
44 changes: 22 additions & 22 deletions doc/sai-ptf/lag_test_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Test Group: Disable Egress/Ingress](#test-group-disable-egressingress)
- [Case6: test_disable_egress](#case6-test_disable_egress)
- [Case7: test_disable_ingress](#case7-test_disable_ingress)
- [Test Group: Remove/Add LAG member](#test-group-removeadd-lag-member)
- [Test Group: Remove/Add LAG member](#test-group-removeadd--lag-member)
- [Case8: test_remove_lag_member](#case8-test_remove_lag_member)
- [Case9: test_add_lag_member](#case9-test_add_lag_member)
# Overriew
Expand Down Expand Up @@ -84,9 +84,9 @@ These cases will cover five scenarios: src/dst ip, src/dst port , protocol. cons
For load balancing, expecting the ports in a lag should receive the packet equally. Traffic direction: from server side to T1 side.

### Test steps: <!-- omit in toc -->
- Generate different packets by updating source port, destination port, source ip, and destination ip of the packet. Packets use lag1 neighbor IPs as destination ip, lag1 neighbor MAC as destination MAC.
- Send these packetes with different protocols on port1.
- Check if packets are recieved on ports of lag1 equally.
1. Generate different packets by updating source port, destination port, source ip, and destination ip of the packet. Packets use lag1 neighbor IPs as destination ip, lag1 neighbor MAC as destination MAC.
1. Send these packetes with different protocols on port1.
1. Check if packets are recieved on ports of lag1 equally.

## Test Group: Disable Egress/Ingress

Expand All @@ -98,13 +98,13 @@ For load balancing, expecting the ports in a lag should receive the packet equal
These cases will cover two scenarios: disable egress and ingress. We can disable ingress or egress on a lag member, then we expect traffic drop on the disabled lag member.

### Test steps: <!-- omit in toc -->
- Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
- Send packet from port1
- Verify packets appear on differnt lag1 members.
- Disable egress/ingress on lag1 member port18
- Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
- Send packet from port1
- Check if Packet drop on port18
1. Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
1. Send packet from port1
1. Verify packets appear on different lag1 members.
1. Disable egress/ingress on lag1 member port18
1. Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
1. Send packet from port1
1. Check if Packet drop on port18

## Test Group: Remove/Add LAG member
### Case8: test_remove_lag_member
Expand All @@ -114,18 +114,18 @@ These cases will cover add and remove lag memeber . We can remove or add a lag

### Test steps: <!-- omit in toc -->
- test_remove_lag_member
- Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
- Send packet from port0
- Verify packets appear on lag1 port18.
- Remove port18 from lag1
- Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
- Send packet from port0
- Check if Packet drop on port18
1. Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
1. Send packet from port0
1. Verify packets appear on lag1 port18.
1. Remove port18 from lag1
1. Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
1. Send packet from port0
1. Check if Packet drop on port18
- test_add_lag_member
- Add port21 to lag1
- Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
- Send packet from port0
- Verify packets appear on lag1 port21.
1. Add port21 to lag1
1. Create packets with variations of the src_ip, dest_ip, src_port,dest_port.(dest_ip is lag1 neighbor IP and MAC is lag1 neighbor MAC)
1. Send packet from port0
1. Verify packets appear on lag1 port21.



87 changes: 42 additions & 45 deletions doc/sai-ptf/vlan_test_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [Case7: test_untagged_mac_learning](#case7-test_untagged_mac_learning)
- [Case8: test_tagged_mac_learning](#case8-test_tagged_mac_learning)
- [Test Case9: Vlan member API](#test-case9-vlan-member-api)
- [Test Case10: Failed to add member to invalidate VLAN](#test-case10-failed-to-add-member-to-invalidate-vlan)
- [Test Case10: Add member to invalidate VLAN](#test-case10-add-member-to-invalidate-vlan)
- [Test Group: VLAN Counters/Status](#test-group-vlan-countersstatus)
- [Case11: test_tagged_vlan_status](#case11-test_tagged_vlan_status)
- [Case12: test_untagged_vlan_status](#case12-test_untagged_vlan_status)
Expand Down Expand Up @@ -83,10 +83,9 @@ Tagged:
```
### Test steps: <!-- omit in toc -->
Test Steps:
- Create ``Untagged``/``Tagged VLAN 1000`` packet with ``mac2`` as dest mac.
- Send packet on Port1.
- Verify ``Untagged`` packet received port2.
1. Create ``Untagged``/``Tagged VLAN 1000`` packet with ``mac2`` as dest mac.
1. Send packet on Port1.
1. Verify ``Untagged`` packet received port2.
## Test Group: Frame Filtering
### Case3: test_untagged_frame_filtering
Expand All @@ -104,10 +103,10 @@ Test example(Untag):
```
### Test steps <!-- omit in toc -->
- Add another ``MacX`` as Port1 mac address into MAC table
- Create ``Untagged``/``Tagged VLAN1000`` packet, ``mac1`` as src mac, ``MacX`` as dest mac
- Send packet on VLAN Port.
- Verify no packet received on any port.
1. Add another ``MacX`` as Port1 mac address into MAC table
1. Create ``Untagged``/``Tagged VLAN1000`` packet, ``mac1`` as src mac, ``MacX`` as dest mac
1. Send packet on VLAN Port.
1. Verify no packet received on any port.
## Test Group: VLAN flooding
### Case5: test_tagged_vlan_flooding
Expand All @@ -123,9 +122,9 @@ Flooding
### Test Steps: <!-- omit in toc -->
- Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as source MAC and a un-existing ``MacX`` as dest MAC
- Send packet on Port1.
- Verify received packet on all port expect Port1.
1. Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as source MAC and a un-existing ``MacX`` as dest MAC
1. Send packet on Port1.
1. Verify received packet on all port expect Port1.
## Test Group: MAC learning
### Case7: test_untagged_mac_learning
Expand All @@ -139,10 +138,10 @@ For mac learning in VLAN scenario, after learning the mac address from the packe

```
### Test Steps: <!-- omit in toc -->
- Create ``Untagged``/``Tagged VLAN1000`` packet, with a un-existing ``MacX`` as src MAC and ``mac2`` as dest MAC
- Send packet on a VLAN source port1.
- Verify packet received on port2.
- Verify MAC table get a new entry for ``MacX`` on port1,
1. Create ``Untagged``/``Tagged VLAN1000`` packet, with a un-existing ``MacX`` as src MAC and ``mac2`` as dest MAC
1. Send packet on a VLAN source port1.
1. Verify packet received on port2.
1. Verify MAC table get a new entry for ``MacX`` on port1,
## Test Case9: Vlan member API
Expand All @@ -153,21 +152,20 @@ For mac learning in VLAN scenario, after learning the mac address from the packe
Test VLAN and member APIs.
### Test steps: <!-- omit in toc -->
Test steps:
- Use VLAN API to list all of the VLAN member in VLAN
- Verify the VLAN member and the account of the VLAN member are same as config in [config](./config_data/config_t0.md)
- Use VLAN API add a new Member, into VLAN
- Verify the VLAN member and the account of the VLAN member are increased by 1.
1. Use VLAN API to list all of the VLAN member in VLAN
1. Verify the VLAN member and the account of the VLAN member are same as config in [config](./config_data/config_t0.md)
1. Use VLAN API add a new Member into VLAN
1. Verify the VLAN member and the account of the VLAN member are increased by 1.
## Test Case10: Failed to add member to invalidate VLAN
## Test Case10: Add member to invalidate VLAN
- test_add_vlan_member_failed
### Testing Objective <!-- omit in toc -->
When add a VLAN member to a non-exist VLAN, it will fail.
### Test Steps: <!-- omit in toc -->
- Use VLAN API add a new Member to a non-exist VLAN, ``VLAN1010``
- Verify the VLAN member added failed.
1. Use VLAN API add a new Member to a non-exist VLAN, ``VLAN1010``
1. Verify the VLAN member added failed.
## Test Group: VLAN Counters/Status
### Case11: test_tagged_vlan_status
Expand All @@ -177,14 +175,13 @@ When add a VLAN member to a non-exist VLAN, it will fail.
For VLAN-related counters, SAI should be able to get the counter and clear them.
### Test Steps: <!-- omit in toc -->
Steps:
- Use SAI API to get the VLAN Status ``_sai_vlan_stat_t`` from [VLAN_HEADER](https://github.com/opencomputeproject/SAI/blob/master/inc/saivlan.h)
- Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as src MAC and ``mac2`` as dest MAC
- Send packet from the source port1
- Verify packet received on the target port2
- Verify counters increased, bytes counter: OCTETS increased, other counters + 1
- Use VLAN clear status API
- Verify counters have been reset
1. Use SAI API to get the VLAN Status ``_sai_vlan_stat_t`` (defined in [saivlan.h](https://github.com/opencomputeproject/SAI/blob/master/inc/saivlan.h) )
2. Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as src MAC and ``mac2`` as dest MAC
3. Send packet from the source port1
4. Verify packet received on the target port2
1. Verify counters increased, bytes counter: OCTETS increased, other counters + 1
2. Use VLAN clear status API
3. Verify counters have been reset
## Test Group7: Disable mac learning
### Case13: test_disable_mac_learning_tagged
Expand All @@ -197,10 +194,10 @@ When disabled, no new MAC will be learned in the MAC table.
- Do not config the MAC table
### Test steps: <!-- omit in toc -->
- Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as src MAC and ``mac2`` as dest MAC
- Send packet from the source port1.
- Verify packets received on all ports except the source port1.
- Verify MAC table, no new entry added in MAC table
1. Create ``Untagged``/``Tagged VLAN1000`` packet, with ``mac1`` as src MAC and ``mac2`` as dest MAC
1. Send packet from the source port1.
1. Verify packets received on all ports except the source port1.
1. Verify MAC table, no new entry added in MAC table
## Test Case15: L3 switching(Inter-VLAN)
### Testing Objective <!-- omit in toc -->
Expand Down Expand Up @@ -240,9 +237,9 @@ The process is as below:
ip_src=SRC_IP)
```
### Test Steps: <!-- omit in toc -->
- Create Packet, with with dest ``SVI_MAC`` as dest mac, and dest IP ``192.168.20.21``(config as [Config_t0](./config_data/config_t0.md))
- Send ``Untagged`` packet on ``port1``
- Verify ``Untagged`` packet received on ``PORT9``
1. Create Packet, with with dest ``SVI_MAC`` as dest mac, and dest IP ``192.168.20.21``(config as [Config_t0](./config_data/config_t0.md))
1. Send ``Untagged`` packet on ``port1``
1. Verify ``Untagged`` packet received on ``PORT9``

## Test Group: ARP Flooding and mac learning
### Case16: test_arp_request_flooding
Expand Down Expand Up @@ -309,10 +306,10 @@ Test example:

### Test Steps: <!-- omit in toc -->
- test_arp_request_flooding
- Create ARP packet with dest ``mac2``
- Send ``Untagged`` ARP packet on ``port1``
- Verify ``Untagged`` Arp request received from Port2 to Port8
1. Create ARP packet with dest ``mac2``
1. Send ``Untagged`` ARP packet on ``port1``
1. Verify ``Untagged`` Arp request received from Port2 to Port8
- test_arp_response_learning
- Create ARP response packet with src:mac2, dest:mac1
- Send ARP response packet on port2
- Verify ``Untagged`` ARP response from Port1
1. Create ARP response packet with src:mac2, dest:mac1
1. Send ARP response packet on port2
1. Verify ``Untagged`` ARP response from Port1

0 comments on commit 2bb1ec8

Please sign in to comment.