Fix lag member ptf to dut test#7776
Conversation
Fix dut may learn mac on wrong port in ptf_to_dut_traffic_test
|
|
|
|
||
| arp_pkt = Ether(src= src_mac, dst=dst_mac)/ARP(op=ARP.who_has, psrc=src_ip, pdst=dst_ip, hwsrc=src_mac) | ||
| send(self, port_behind_lag, arp_pkt) | ||
| time.sleep(1) |
There was a problem hiding this comment.
Commonly, in sonic test scripts, the "arp responder" is used to give correct ARP response to DUT.
Here, seems trying to use a different way by sending an ARP reqeust or Gratuitous ARP. Maybe that's not a good solution since it will reduce the step of the ARP request from DUT and it may be not a normal behavior in networking. If the "arp request" from dut is also one necessary step for this whole testcase, we should not bypass it.
|
-->Both bond1 and eth23 have same subnet mask. Here, why do the ARP in PTF use submask here? The submask should only be used by ARP proxy. |
|
@twtseng-tim Is this a backport of master branch PR to 202205 branch? Can you mention the master branch PR ID here in PR description? |
|
Sorry, this is not a backport PR, fixed |
|
@twtseng-tim If this is not backport, probably the issue is also on master branch. Do we need to fix it in master branch again? |
Yes |
|
@twtseng-tim In this case, the correct way is to create PR to master branch instead of creating PR to 202205 branch. Then we can cherry-pick it to 202205 branch. I am closing this PR. Please submit PR to master branch instead. Thanks! |
Description of PR
Summary:
Fix dut may learn mac on wrong port in ptf_to_dut_traffic_test
Fixes # (issue)
issues#6663
Type of change
Back port request
Approach
What is the motivation for this PR?
The lag member test configuration on ptf looks like this:
Both bond1 and eth23 have same subnet mask.
When dut send arp to ptf for ask nexthop, both ports reply 192.168.9.2 is-at here.
So arp might learn on the wrong port, failing the icmp packet forwarding test.
How did you do it?
Send arp request form ptf first, let dut learn nexthop on the correct port.
How did you verify/test it?
Run and passed the lag_member_test test case.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation