Skip to content

[qos 202012] Refresh ARP entry with mac address of PTF port instead of DUT VLAN interface#7801

Merged
XuChen-MSFT merged 2 commits intosonic-net:202012from
XuChen-MSFT:xuchen3/202012/incorrectly-refresh-arp-in-headroom-pool-size-test
Mar 22, 2023
Merged

[qos 202012] Refresh ARP entry with mac address of PTF port instead of DUT VLAN interface#7801
XuChen-MSFT merged 2 commits intosonic-net:202012from
XuChen-MSFT:xuchen3/202012/incorrectly-refresh-arp-in-headroom-pool-size-test

Conversation

@XuChen-MSFT
Copy link
Copy Markdown
Contributor

…fault vlan

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

n testcase sai_qos_tests.HdrmPoolSizeTest:

Test traffic's destination port is one of PTF port.
To correctly forward test traffic to dest PTF port, we should populate a correct ARP entry on DUT before test.
But in HdrmPoolSizeTest case, build a incorrect ARP packet, as below:

Ethernet II
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
    Source: 00:aa:bb:cc:dd:ee (00:aa:bb:cc:dd:ee)    >>>> incorrect address, it's mac addr of default vlan interface on dut
    Type: ARP (0x0806)
Address Resolution Protocol (request)
    Sender MAC address: 00:aa:bb:cc:dd:ee (00:aa:bb:cc:dd:ee)   >>>>  incorrect address, it's mac addr of default vlan interface on dut
    Sender IP address: 192.168.0.12
    Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Target IP address: 192.168.0.1

RCA:
improperly use self.dst_port_mac to fill both ARP request sender address and test traffice's dest address:
We want to set test traffic's dest address to default vlan interface mac adress, so we change self.dst_port_mac to defalut vlan mac address before populate ARP. This address changing occured too early, and cuased incorrect ARP packet.

How did you do it?

When populate ARP, should use PTF port's mac address instead of DUT's default VLAN interface.
and then change traffca's dest mac address to default vlan interface during test.

How did you verify/test it?

Any platform specific information?

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

Documentation

@XuChen-MSFT XuChen-MSFT merged commit e758f28 into sonic-net:202012 Mar 22, 2023
@wangxin
Copy link
Copy Markdown
Collaborator

wangxin commented Mar 24, 2023

This PR is for the 202012 branch. No need to add label "Request for 202012 branch".

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.

3 participants