From be2aa167c6eaf6cf0c6ce43c0c5513fa7e65cbfd Mon Sep 17 00:00:00 2001 From: Mukesh Moopath Velayudhan Date: Mon, 28 Oct 2024 14:05:20 -0700 Subject: [PATCH] Mark appliance local region ID as create-only attribute (#634) --- dash-pipeline/SAI/specs/dash_appliance.yaml | 2 +- dash-pipeline/bmv2/stages/pre_pipeline.p4 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dash-pipeline/SAI/specs/dash_appliance.yaml b/dash-pipeline/SAI/specs/dash_appliance.yaml index 19f412e59..f8bbf8b1f 100644 --- a/dash-pipeline/SAI/specs/dash_appliance.yaml +++ b/dash-pipeline/SAI/specs/dash_appliance.yaml @@ -17,7 +17,7 @@ sai_apis: attr_value_field: u8 default: '0' isresourcetype: false - flags: CREATE_AND_SET + flags: CREATE_ONLY object_name: null allow_null: false valid_only: null diff --git a/dash-pipeline/bmv2/stages/pre_pipeline.p4 b/dash-pipeline/bmv2/stages/pre_pipeline.p4 index fc94c672b..b65fb2f64 100644 --- a/dash-pipeline/bmv2/stages/pre_pipeline.p4 +++ b/dash-pipeline/bmv2/stages/pre_pipeline.p4 @@ -6,7 +6,9 @@ control pre_pipeline_stage(inout headers_t hdr, { action accept() {} - action set_appliance(bit<8> local_region_id) { + action set_appliance( + @SaiVal[create_only="true"] + bit<8> local_region_id) { meta.local_region_id = local_region_id; }