From fd8397b519c770a07c82a059c47cd450ab8d7063 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Thu, 15 Feb 2024 22:38:33 +0000 Subject: [PATCH] Set SAI PL attribute based on ROUTING_TYPE Signed-off-by: Lawrence Lee --- orchagent/dash/dashvnetorch.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/orchagent/dash/dashvnetorch.cpp b/orchagent/dash/dashvnetorch.cpp index c34ec116721..40018f5115b 100644 --- a/orchagent/dash/dashvnetorch.cpp +++ b/orchagent/dash/dashvnetorch.cpp @@ -295,13 +295,6 @@ void DashVnetOrch::addOutboundCaToPa(const string& key, VnetMapBulkContext& ctxt for (auto action: route_type_actions.items()) { - if (action.action_type() == dash::route_type::ACTION_TYPE_4_to_6) - { - outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_ACTION; - outbound_ca_to_pa_attr.value.u32 = SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING; - outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr); - } - if (action.action_type() == dash::route_type::ACTION_TYPE_STATICENCAP) { outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_DASH_ENCAPSULATION; @@ -328,6 +321,10 @@ void DashVnetOrch::addOutboundCaToPa(const string& key, VnetMapBulkContext& ctxt if (ctxt.metadata.action_type() == dash::route_type::ROUTING_TYPE_PRIVATELINK) { + outbound_ca_to_pa_attr.id = SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_ACTION; + outbound_ca_to_pa_attr.value.u32 = SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING; + 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_UNDERLAY_DIP; to_sai(ctxt.metadata.underlay_ip(), outbound_ca_to_pa_attr.value.ipaddr); outbound_ca_to_pa_attrs.push_back(outbound_ca_to_pa_attr);