From 1427cae51f2d44519aeacf3b6b6d56eb4383a660 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Tue, 19 Nov 2024 22:53:00 +0000 Subject: [PATCH 1/2] Leave some OUTBOUND_CA_TO_PA attrs unset Signed-off-by: Lawrence Lee --- orchagent/dash/dashvnetorch.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/orchagent/dash/dashvnetorch.cpp b/orchagent/dash/dashvnetorch.cpp index a143c31484..512b03396d 100644 --- a/orchagent/dash/dashvnetorch.cpp +++ b/orchagent/dash/dashvnetorch.cpp @@ -349,13 +349,19 @@ bool DashVnetOrch::addOutboundCaToPa(const string& key, VnetMapBulkContext& ctxt outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); } - outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_OVERLAY_DMAC; - memcpy(outbound_ca_to_pa_attr.value.mac, ctxt.metadata.mac_address().c_str(), sizeof(sai_mac_t)); - outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); + if (ctxt.metadata.has_mac_address()) + { + outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_OVERLAY_DMAC; + memcpy(outbound_ca_to_pa_attr.value.mac, ctxt.metadata.mac_address().c_str(), sizeof(sai_mac_t)); + outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); + } - outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_USE_DST_VNET_VNI; - outbound_ca_to_pa_attr.value.booldata = ctxt.metadata.use_dst_vni(); - outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); + if (ctxt.metadata.has_use_dst_vni()) + { + outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_USE_DST_VNET_VNI; + outbound_ca_to_pa_attr.value.booldata = ctxt.metadata.use_dst_vni(); + outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); + } object_statuses.emplace_back(); outbound_ca_to_pa_bulker_.create_entry(&object_statuses.back(), &outbound_ca_to_pa_entry, From c022d5016839aa6b89a83b834a72752fdad71472 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Tue, 19 Nov 2024 22:53:26 +0000 Subject: [PATCH 2/2] remove unused MAC from test config Signed-off-by: Lawrence Lee --- tests/dash/dash_configs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/dash/dash_configs.py b/tests/dash/dash_configs.py index 0635631b41..ef57c039c9 100644 --- a/tests/dash/dash_configs.py +++ b/tests/dash/dash_configs.py @@ -93,7 +93,6 @@ } VNET_MAPPING_CONFIG_PRIVATELINK = { - "mac_address": bytes.fromhex(MAC_STRING), "action_type": RoutingType.ROUTING_TYPE_PRIVATELINK, "underlay_ip": { "ipv4": socket.htonl(int(IP(UNDERLAY_IP)))