Skip to content

Commit 9b8bafe

Browse files
committed
ENI based forwarding
New test for the smartswitch feature ENI based forwarding. Test plan: #19018
1 parent 4ebcd4f commit 9b8bafe

File tree

4 files changed

+544
-1
lines changed

4 files changed

+544
-1
lines changed

tests/dash/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def vxlan_udp_dport(request, duthost):
427427
break
428428
vxlan_udp_dport = random.choice(port_candidate_list)
429429
if vxlan_udp_dport != "default":
430-
logger.info(f"Configure the VXLAN UDP dst port {vxlan_udp_dport} to DPU")
430+
logger.info(f"Configure the VXLAN UDP dst port {vxlan_udp_dport} to dut")
431431
vxlan_udp_dport = int(vxlan_udp_dport)
432432
config_vxlan_udp_dport(duthost, vxlan_udp_dport)
433433
else:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[
2+
{
3+
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ active_eni_mac }}":
4+
{
5+
"vdpu_ids": "{{ vdpus[0] }},{{ vdpus[1] }}",
6+
"primary_vdpu": "{{ vdpus[0] }}"
7+
},
8+
"OP": "{{ op }}"
9+
},
10+
{
11+
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ standby_eni_mac }}":
12+
{
13+
"vdpu_ids": "{{ vdpus[0] }},{{ vdpus[1] }}",
14+
"primary_vdpu": "{{ vdpus[1] }}"
15+
},
16+
"OP": "{{ op }}"
17+
},
18+
{
19+
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ non_existing_eni_mac }}":
20+
{
21+
"vdpu_ids": "{{ vdpus_all_remote[0] }},{{ vdpus_all_remote[1] }}",
22+
"primary_vdpu": "{{ vdpus_all_remote[0] }}"
23+
},
24+
"OP": "{{ op }}"
25+
}
26+
]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"DEVICE_METADATA": {
3+
"localhost": {
4+
"cluster": "t1-smartswitch-01"
5+
}
6+
},
7+
"VIP_TABLE" : {
8+
"{{ vip }}" : {}
9+
},
10+
"DPU": {
11+
{%- for dpu_index in range(0, dpu_num) %}
12+
"dpu{{ dpu_index }}": {
13+
"dpu_id": "{{ dpu_index }}",
14+
"gnmi_port": "50052",
15+
"local_port": "8080",
16+
"midplane_ipv4": "169.254.200.{{ dpu_index + 1 }}",
17+
"orchagent_zmq_port": "8100",
18+
{%- if dpu_index == dpu_under_test_index %}
19+
"pa_ipv4": "{{ mock_pa_ipv4 }}",
20+
"local_nexthop_ip": "{{ mock_pa_ipv4 }}",
21+
{%- else %}
22+
"pa_ipv4": "18.{{ dpu_index }}.202.1",
23+
"local_nexthop_ip": "18.{{ dpu_index }}.202.1",
24+
{%- endif %}
25+
"state": "up",
26+
"vdpu_id": "vdpu0_{{ dpu_index }}",
27+
"vip_ipv4": "10.1.0.5"
28+
}{% if not loop.last %},{% endif %}
29+
{%- endfor %}
30+
},
31+
"REMOTE_DPU": {
32+
{%- for dpu_index in range(0, dpu_num) %}
33+
"dpu{{ dpu_index + dpu_num }}": {
34+
"dpu_id": "{{ dpu_index + dpu_num }}",
35+
"npu_ipv4": "{{ peer_loopback0_ip }}",
36+
"pa_ipv4": "18.{{ dpu_index }}.202.1",
37+
"type": "cluster"
38+
}{% if not loop.last %},{% endif %}
39+
{%- endfor %}
40+
},
41+
"VDPU": {
42+
{%- for dpu_index in range(0, dpu_num) %}
43+
"vdpu0_{{ dpu_index }}": {
44+
"main_dpu_ids": "dpu{{ dpu_index }}"
45+
},
46+
{%- endfor %}
47+
{%- for dpu_index in range(0, dpu_num) %}
48+
"vdpu1_{{ dpu_index }}": {
49+
"main_dpu_ids": "dpu{{ dpu_index + dpu_num }}"
50+
}{% if not loop.last %},{% endif %}
51+
{%- endfor %}
52+
},
53+
"VXLAN_TUNNEL": {
54+
"tunnel_v4": {
55+
"src_ip": "{{ loopback0_ip }}"
56+
}
57+
},
58+
"VNET": {
59+
"{{ vnet_name }}": {
60+
"vxlan_tunnel": "tunnel_v4",
61+
"vni": "{{ vni }}",
62+
"peer_list": ""
63+
}
64+
},
65+
"PORTCHANNEL_INTERFACE" : {
66+
"{{ vnet_interface }}" : {
67+
"vnet_name" : "{{ vnet_name }}"
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)