Skip to content

Commit

Permalink
Update Sai annotation to SaiVal.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 14, 2023
1 parent c8b5138 commit f4485f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions dash-pipeline/bmv2/dash_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ control dash_ingress(
const default_action = deny;
}

action check_ip_addr_family(@Sai[type="sai_ip_addr_family_t", isresourcetype="true"] bit<32> ip_addr_family) {
action check_ip_addr_family(@SaiVal[type="sai_ip_addr_family_t", isresourcetype="true"] bit<32> ip_addr_family) {
if (ip_addr_family == 0) /* SAI_IP_ADDR_FAMILY_IPV4 */ {
if (meta.flow.is_ipv6 == 1) {
meta.pkt_meta.dropped = true;
Expand Down Expand Up @@ -267,9 +267,9 @@ control dash_ingress(
counter(MAX_METER_BUCKETS, CounterType.bytes) meter_bucket_outbound;
#endif // TARGET_BMV2_V1MODEL
action meter_bucket_action(
@Sai[type="sai_uint64_t", isreadonly="true"] bit<64> outbound_bytes_counter,
@Sai[type="sai_uint64_t", isreadonly="true"] bit<64> inbound_bytes_counter,
@Sai[type="sai_uint32_t", skipattr="true"] bit<32> meter_bucket_index) {
@SaiVal[type="sai_uint64_t", isreadonly="true"] bit<64> outbound_bytes_counter,
@SaiVal[type="sai_uint64_t", isreadonly="true"] bit<64> inbound_bytes_counter,
@SaiVal[type="sai_uint32_t", skipattr="true"] bit<32> meter_bucket_index) {
// read only counters for SAI api generation only
meta.meter_bucket_index = meter_bucket_index;
}
Expand Down Expand Up @@ -304,7 +304,7 @@ control dash_ingress(
const default_action = deny;
}

action set_acl_group_attrs(@Sai[type="sai_ip_addr_family_t", isresourcetype="true"] bit<32> ip_addr_family) {
action set_acl_group_attrs(@SaiVal[type="sai_ip_addr_family_t", isresourcetype="true"] bit<32> ip_addr_family) {
if (ip_addr_family == 0) /* SAI_IP_ADDR_FAMILY_IPV4 */ {
if (meta.flow.is_ipv6 == 1) {
meta.pkt_meta.dropped = true;
Expand Down
1 change: 0 additions & 1 deletion dash-pipeline/bmv2/underlay.p4
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ control underlay(
}

@SaiTable[name = "route", api = "route", api_type="underlay"]
// TODO: To add structural annotations (example: @Sai[skipHeaderGen=true])
table underlay_routing {
key = {
meta.flow.dip : lpm @SaiVal[name = "destination"];
Expand Down

0 comments on commit f4485f7

Please sign in to comment.