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

Enhance packet validation for lag member ports on VLAN ansible test. #1332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

linemma
Copy link
Contributor

@linemma linemma commented Jan 14, 2020

Signed-off-by: Emma Lin [email protected]

Description of PR

Enhance packet validation for lag member ports on VLAN ansible test.

Summary:
Fixes #1288
It expects to receive ICMP reply packet from fixed port of lag (1st member port) on VLAN ansible test script. It shall not specify fixed port to verify, because the ICMP reply packet may come from any port of lag.

Enhance packet validation for lag member ports:

  • vlan_info.j2

    1. Add new field 'is_lag' to identify interface type.
    2. Lag interface: replace 'port_index' with 'port_indices' to take all lag member ports
    3. Normal port interface: only take the port which is not lag member
  • vlan_test.py

    1. If the verify interface is lag, verify packets on all lag member ports. When one of lag member ports receives expected packet, the test shall be passed.
    2. On test case 4, it tests ICMP routing, the DA of ICMP reply packet may equal to one of lag port interfaces on ptf server (because dut may send ARP packet from one of lag member port). So the test shall be passed when following conditions are matched:
      • the ICMP reply packet come from one of lag member port interface
      • the DA of ICMP reply packet is equal to one of lag member port's MAC

Type of change

  • Bug fix
  • [] Testbed and Framework(new/improvement)
  • [] Test case(new/improvement)

Approach

How did you do it?

How did you verify/test it?

Run vlan ansible test with t0-116 topology and check the test result. No matter ICMP reply packet come from which lag member port, the test result is passed.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Enhance packet validation for lag member ports on VLAN ansible test.

Summary:
Fixes #1288
It expects to receive ICMP reply packet from fixed port of lag (1st
member port) on VLAN ansible test script. It shall not specify fixed port
to verify, because the ICMP reply packet may come from any port of lag.

Enhance packet validation for lag member ports:
- vlan_info.j2
  1. Add new field 'is_lag' to identify interface type.
  2. Lag interface: replace 'port_index' with 'port_indices' to take all
  lag member ports.
  3. Normal port interface: only take the port which is not lag member.
- vlan_test.py
  1. If the verify interface is lag, verify packets on all lag member
  ports. When one of lag member ports receives expected packet, the test
  shall be passed.
  2. On test case #4, it tests ICMP routing, the DA of ICMP reply packet
  may equal to one of lag port interfaces on PTF server (because dut may
  send ARP packet from one of lag member ports). So the test shall be
  passed when following conditions are matched:
    - the ICMP reply packet is come from one of lag member port interfaces
    - the DA of ICMP reply packet is equal to one of lag member port's MAC

Type of chang
[v] Bug fix
[] Testbed and Frameword(new/improvement)
[] Test case(new/improvement)
@yxieca
Copy link
Collaborator

yxieca commented May 12, 2020

@linemma can you rebase this PR and solve the merge conflict?

@yxieca yxieca self-requested a review May 12, 2020 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vlan] test failed on t0-116 topology
2 participants