Skip to content

Commit

Permalink
[dash] add USE_DST_VNET_VNI attribute to CA-to-PA entry (sonic-net#2533)
Browse files Browse the repository at this point in the history
Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
  • Loading branch information
Yakiv-Huryk authored Nov 17, 2022
1 parent 7c3f76c commit 87eb07c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions orchagent/dash/dashvnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ bool DashVnetOrch::addOutboundCaToPa(const string& key, VnetMapBulkContext& ctxt
memcpy(outbound_ca_to_pa_attr.value.mac, ctxt.mac_address.getMac(), 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.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,
(uint32_t)outbound_ca_to_pa_attrs.size(), outbound_ca_to_pa_attrs.data());
Expand Down
2 changes: 1 addition & 1 deletion orchagent/dash/dashvnetorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct VnetMapBulkContext
swss::IpAddress underlay_ip;
swss::MacAddress mac_address;
uint32_t metering_bucket;
bool use_dst_vni;
bool use_dst_vni = false;
std::deque<sai_status_t> outbound_ca_to_pa_object_statuses;
std::deque<sai_status_t> pa_validation_object_statuses;
VnetMapBulkContext() {}
Expand Down

0 comments on commit 87eb07c

Please sign in to comment.