Skip to content

Commit

Permalink
migrate hash rule to config.md
Browse files Browse the repository at this point in the history
Signed-off-by: zhoudongxu <[email protected]>
  • Loading branch information
zhoudongxu committed Jun 8, 2022
1 parent 2ad245e commit acb0843
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
11 changes: 11 additions & 0 deletions doc/sai-ptf/config_data/config_t0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [LAG Neighbors](#lag-neighbors)
- [LAG configuration](#lag-configuration)
- [LAG and LAG members](#lag-and-lag-members)
- [LAG Hash Rule](#lag-hash-rule)
- [FDB Configuration](#fdb-configuration)
- [MAC Table](#mac-table)
## Overriew
Expand Down Expand Up @@ -76,6 +77,16 @@ This document describes the sample configuration data.
|Ethernet76-80|lag1|Port17-18|
|Ethernet84-88|lag2|Port19-20|

### LAG Hash Rule
- Set hash alogrithm as SAI_HASH_ALGORITHM_CRC
- Set switch hash attribute as below, which mean switch computes hash value using the five fields of packet.
```
SAI_NATIVE_HASH_FIELD_SRC_IP
SAI_NATIVE_HASH_FIELD_DST_IP
SAI_NATIVE_HASH_FIELD_IP_PROTOCOL
SAI_NATIVE_HASH_FIELD_L4_DST_PORT
SAI_NATIVE_HASH_FIELD_L4_SRC_PORT
```

## FDB Configuration
### MAC Table
Expand Down
20 changes: 5 additions & 15 deletions doc/sai-ptf/lag_test_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ These cases will cover five scenarios: src/dst ip, src/dst port , protocol. cons
### Testing Objective <!-- omit in toc -->
For load balancing, expecting the ports in a lag should receive the packet equally. Traffic direction: from server side to T1 side.

### Additional config: <!-- omit in toc -->
- Set hash alogrithm as SAI_HASH_ALGORITHM_CRC
- Set switch hash attribute as below, which mean switch computes hash value using the five fields of packet.
```
SAI_NATIVE_HASH_FIELD_SRC_IP
SAI_NATIVE_HASH_FIELD_DST_IP
SAI_NATIVE_HASH_FIELD_IP_PROTOCOL
SAI_NATIVE_HASH_FIELD_L4_DST_PORT
SAI_NATIVE_HASH_FIELD_L4_SRC_PORT
```
### 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.
Expand All @@ -108,13 +98,13 @@ SAI_NATIVE_HASH_FIELD_L4_SRC_PORT
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 is lag2 neighbor IP and MAC is lag2 neighbor MAC.
- 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 lag2 members.
- Disable egress/ingress on lag2 member port20
- Create packets with variations of the src_ip, dest ip is lag2 neighbor IP and MAC is lag2 neighbor MAC.
- 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 port20
- Check if Packet drop on port18

## Test Group: Remove/Add LAG member
### Case8: test_remove_lag_member
Expand Down

0 comments on commit acb0843

Please sign in to comment.