Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/dash/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def vxlan_udp_dport(request, duthost):
break
vxlan_udp_dport = random.choice(port_candidate_list)
if vxlan_udp_dport != "default":
logger.info(f"Configure the VXLAN UDP dst port {vxlan_udp_dport} to DPU")
logger.info(f"Configure the VXLAN UDP dst port {vxlan_udp_dport} to dut")
vxlan_udp_dport = int(vxlan_udp_dport)
config_vxlan_udp_dport(duthost, vxlan_udp_dport)
else:
Expand Down
26 changes: 26 additions & 0 deletions tests/dash/templates/eni_based_forwarding_appl_db.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ active_eni_mac }}":
{
"vdpu_ids": "{{ vdpus[0] }},{{ vdpus[1] }}",
"primary_vdpu": "{{ vdpus[0] }}"
},
"OP": "{{ op }}"
},
{
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ standby_eni_mac }}":
{
"vdpu_ids": "{{ vdpus[0] }},{{ vdpus[1] }}",
"primary_vdpu": "{{ vdpus[1] }}"
},
"OP": "{{ op }}"
},
{
"DASH_ENI_FORWARD_TABLE:{{ vnet_name }}:{{ non_existing_eni_mac }}":
{
"vdpu_ids": "{{ vdpus_all_remote[0] }},{{ vdpus_all_remote[1] }}",
"primary_vdpu": "{{ vdpus_all_remote[0] }}"
},
"OP": "{{ op }}"
}
]
70 changes: 70 additions & 0 deletions tests/dash/templates/eni_based_forwarding_config_db.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"DEVICE_METADATA": {
"localhost": {
"cluster": "t1-smartswitch-01"
}
},
"VIP_TABLE" : {
"{{ vip }}" : {}
},
"DPU": {
{%- for dpu_index in range(0, dpu_num) %}
"dpu{{ dpu_index }}": {
"dpu_id": "{{ dpu_index }}",
"gnmi_port": "50052",
"local_port": "8080",
"midplane_ipv4": "169.254.200.{{ dpu_index + 1 }}",
"orchagent_zmq_port": "8100",
{%- if dpu_index == dpu_under_test_index %}
"pa_ipv4": "{{ mock_pa_ipv4 }}",
"local_nexthop_ip": "{{ mock_pa_ipv4 }}",
{%- else %}
"pa_ipv4": "18.{{ dpu_index }}.202.1",
"local_nexthop_ip": "18.{{ dpu_index }}.202.1",
{%- endif %}
"state": "up",
"vdpu_id": "vdpu0_{{ dpu_index }}",
"vip_ipv4": "10.1.0.5"
}{% if not loop.last %},{% endif %}
{%- endfor %}
},
"REMOTE_DPU": {
{%- for dpu_index in range(0, dpu_num) %}
"dpu{{ dpu_index + dpu_num }}": {
"dpu_id": "{{ dpu_index + dpu_num }}",
"npu_ipv4": "{{ peer_loopback0_ip }}",
"pa_ipv4": "18.{{ dpu_index }}.202.1",
"type": "cluster"
}{% if not loop.last %},{% endif %}
{%- endfor %}
},
"VDPU": {
{%- for dpu_index in range(0, dpu_num) %}
"vdpu0_{{ dpu_index }}": {
"main_dpu_ids": "dpu{{ dpu_index }}"
},
{%- endfor %}
{%- for dpu_index in range(0, dpu_num) %}
"vdpu1_{{ dpu_index }}": {
"main_dpu_ids": "dpu{{ dpu_index + dpu_num }}"
}{% if not loop.last %},{% endif %}
{%- endfor %}
},
"VXLAN_TUNNEL": {
"tunnel_v4": {
"src_ip": "{{ loopback0_ip }}"
}
},
"VNET": {
"{{ vnet_name }}": {
"vxlan_tunnel": "tunnel_v4",
"vni": "{{ vni }}",
"peer_list": ""
}
},
"PORTCHANNEL_INTERFACE" : {
"{{ vnet_interface }}" : {
"vnet_name" : "{{ vnet_name }}"
}
}
}
Loading