From 1ac41d4e1504e8a0fd226ec6a53657975c729126 Mon Sep 17 00:00:00 2001 From: mukeshmv Date: Mon, 28 Oct 2024 20:10:30 +0000 Subject: [PATCH] Mark appliance local region ID as create-only attribute --- 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; }