Skip to content

Commit

Permalink
Add reverse tunnel learning attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Sep 22, 2024
1 parent ac9741a commit 9fd4862
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
15 changes: 14 additions & 1 deletion dash-pipeline/SAI/specs/dash_eni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,20 @@ sai_apis:
valid_only: null
is_vlan: false
deprecated: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_ENI_ATTR_ENABLE_REVERSE_TUNNEL_LEARNING
description: Action parameter enable reverse tunnel learning
type: bool
attr_value_field: booldata
default: 'false'
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_ENI_ATTR_REVERSE_TUNNEL_SIP
description: Action parameter reverse tunnel sip
Expand All @@ -610,7 +624,6 @@ sai_apis:
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
stats:
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_ENI_STAT_RX_BYTES
Expand Down
1 change: 1 addition & 0 deletions dash-pipeline/bmv2/dash_metadata.p4
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ struct metadata_t {
encap_data_t encap_data;
// tunnel_data is used by dash_tunnel_id
encap_data_t tunnel_data;
bit<1> enable_reverse_tunnel_learning;
IPv4Address reverse_tunnel_sip;
overlay_rewrite_data_t overlay_data;
bit<16> dash_tunnel_id;
Expand Down
6 changes: 4 additions & 2 deletions dash-pipeline/bmv2/dash_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ control dash_ingress(
bit<1> full_flow_resimulation_requested,
bit<64> max_resimulated_flow_per_second,
@SaiVal[type="sai_object_id_t"] bit<16> outbound_routing_group_id,
@SaiVal[type="sai_ip_address_t"] IPv4Address reverse_tunnel_sip,
bit<1> enable_reverse_tunnel_learning,
@SaiVal[type="sai_ip_address_t"] IPv4Address reverse_tunnel_sip,
bit<1> is_ha_flow_owner)
{
meta.eni_data.cps = cps;
Expand All @@ -101,7 +101,9 @@ control dash_ingress(
meta.encap_data.vni = vm_vni;
meta.vnet_id = vnet_id;

meta.reverse_tunnel_sip = reverse_tunnel_sip;
meta.enable_reverse_tunnel_learning = enable_reverse_tunnel_learning;
meta.reverse_tunnel_sip = reverse_tunnel_sip;

meta.routing_actions = meta.routing_actions | dash_routing_actions_t.REVERSE_TUNNEL;

if (meta.is_overlay_ip_v6 == 1) {
Expand Down

0 comments on commit 9fd4862

Please sign in to comment.