Skip to content

Commit

Permalink
Merge remote-tracking branch 'sonic-net/main' into dp_app_add_flow_in…
Browse files Browse the repository at this point in the history
…_pipeline
  • Loading branch information
jimmyzhai committed Sep 2, 2024
2 parents ab45aaf + 78fca1e commit 2707d58
Show file tree
Hide file tree
Showing 10 changed files with 241 additions and 207 deletions.
4 changes: 2 additions & 2 deletions dash-pipeline/SAI/specs/dash_appliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 41127208
id: 45177948
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 29471696
id: 17143042
attr_param_id: {}
14 changes: 7 additions & 7 deletions dash-pipeline/SAI/specs/dash_inbound_routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR
description: Action parameter meter class or
Expand Down Expand Up @@ -135,32 +135,32 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 46226512
id: 35881437
actions:
SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP
id: 19753110
id: 26741158
attr_param_id:
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR: 1
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_AND: 2
SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE
id: 25922590
id: 26064107
attr_param_id:
SAI_INBOUND_ROUTING_ENTRY_ATTR_SRC_VNET_ID: 1
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR: 2
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_AND: 3
SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP
id: 29008246
id: 24482615
attr_param_id: {}
SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE
id: 21551298
id: 24695752
attr_param_id: {}
8 changes: 4 additions & 4 deletions dash-pipeline/SAI/specs/dash_pa_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_PA_VALIDATION_ENTRY_ATTR_IP_ADDR_FAMILY
description: IP address family for resource accounting
Expand All @@ -64,15 +64,15 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 43665660
id: 49415809
actions:
SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT
id: 19504487
id: 17521061
attr_param_id: {}
8 changes: 4 additions & 4 deletions dash-pipeline/SAI/specs/dash_vip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_VIP_ENTRY_ATTR_IP_ADDR_FAMILY
description: IP address family for resource accounting
Expand All @@ -58,15 +58,15 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 48212080
id: 36083221
actions:
SAI_VIP_ENTRY_ACTION_ACCEPT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_VIP_ENTRY_ACTION_ACCEPT
id: 22859453
id: 21715559
attr_param_id: {}
5 changes: 4 additions & 1 deletion dash-pipeline/bmv2/dash_inbound.p4
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "dash_acl.p4"
#include "routing_actions/routing_actions.p4"
#include "dash_conntrack.p4"
#include "stages/inbound_routing.p4"

control inbound(inout headers_t hdr,
inout metadata_t meta)
Expand All @@ -28,12 +29,14 @@ control inbound(inout headers_t hdr,
}

#ifdef STATEFUL_P4
ConntrackOut.apply(1);
ConntrackOut.apply(1);
#endif /* STATEFUL_P4 */
#ifdef PNA_CONNTRACK
ConntrackOut.apply(hdr, meta);
#endif //PNA_CONNTRACK

inbound_routing_stage.apply(hdr, meta);

do_tunnel_encap(hdr,
meta,
meta.overlay_data.dmac,
Expand Down
3 changes: 3 additions & 0 deletions dash-pipeline/bmv2/dash_metadata.p4
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum bit<16> dash_pipeline_stage_t {

// Inbound stages
INBOUND_STAGE_START = 100,
INBOUND_ROUTING = 100, // OUTBOUND_STAGE_START

// Outbound stages
OUTBOUND_STAGE_START = 200,
Expand Down Expand Up @@ -68,6 +69,7 @@ struct eni_data_t {
bit<6> dscp;
dash_tunnel_dscp_mode_t dscp_mode;
outbound_routing_group_data_t outbound_routing_group_data;
IPv4Address vip;
}

struct meter_context_t {
Expand Down Expand Up @@ -152,6 +154,7 @@ struct metadata_t {
dash_direction_t direction;
dash_eni_mac_type_t eni_mac_type;
dash_eni_mac_override_type_t eni_mac_override_type;
encap_data_t rx_encap;
EthernetAddress eni_addr;
bit<16> vnet_id;
bit<16> dst_vnet_id;
Expand Down
Loading

0 comments on commit 2707d58

Please sign in to comment.