Commit 5904408
Use high second octet for mirror receiver IP to avoid conflicts
Summary:
Mirror tests fail on platforms with many ports because the receiver IP (`201.0.0.10`) can conflict with interface IPs generated by `genInterfaceAddress()`.
The function uses `ipDecimal % 224` for the first octet and `ipDecimal / 224` for the second octet. With 200+ ports, the second octet increments, creating interface IPs like `201.0.0.x` that conflict with the receiver IP.
Changed receiver IP to `201.201.0.10` - using a high second octet (201) ensures no conflict since `ipDecimal / 224` produces small values for typical port counts.
Issue :
Tahan-sb has more interfaces than Tahan (100T switch with 400G ports vs 50T switch with 800G ports).
The test creates a subnet for each interface sequentially starting from 1.0.0.0/24, with drop rules installed in the ASIC for each subnet. Test packets are sent to 201.x.x.x expecting them to be mirrored.
On Tahan, the packet doesn't match any subnet and catches the default route with a valid next-hop, so the packet reaches the port and gets mirrored. On Tahan-sb, due to the increased number of interfaces, the packet matches a subnet route and gets dropped before reaching the port - resulting in no mirroring.
Reviewed By: ashutoshgrewal
Differential Revision: D90695135
fbshipit-source-id: 3785e625dd602620a87463aaacf32596e0e236de1 parent 1111e8f commit 5904408
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments