From a8c5dc913eb685d56e3a0b368690df664c11ea69 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Wed, 13 Mar 2024 09:38:25 -0700 Subject: [PATCH] Remove INVALID mode from DSCP modes (#533) * Remove INVALID mode from DSCP modes Preserve is the default, there is no condition under which INVALID can be set. * Update dash_pipeline.p4 --- dash-pipeline/bmv2/dash_metadata.p4 | 5 ++--- dash-pipeline/bmv2/dash_pipeline.p4 | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dash-pipeline/bmv2/dash_metadata.p4 b/dash-pipeline/bmv2/dash_metadata.p4 index 49b1080cb..8e6e7c11d 100644 --- a/dash-pipeline/bmv2/dash_metadata.p4 +++ b/dash-pipeline/bmv2/dash_metadata.p4 @@ -38,9 +38,8 @@ struct conntrack_data_t { } enum bit<16> dash_tunnel_dscp_mode_t { - INVALID = 0, - PRESERVE_MODEL = 1, - PIPE_MODEL = 2 + PRESERVE_MODEL = 0, + PIPE_MODEL = 1 } struct eni_data_t { diff --git a/dash-pipeline/bmv2/dash_pipeline.p4 b/dash-pipeline/bmv2/dash_pipeline.p4 index cff4e1baf..dc7405ed9 100644 --- a/dash-pipeline/bmv2/dash_pipeline.p4 +++ b/dash-pipeline/bmv2/dash_pipeline.p4 @@ -259,6 +259,7 @@ control dash_ingress( eni_lookup_stage.apply(hdr, meta); // Save the original DSCP value + meta.eni_data.dscp_mode = dash_tunnel_dscp_mode_t.PRESERVE_MODEL; meta.eni_data.dscp = (bit<6>)hdr.u0_ipv4.diffserv; if (meta.direction == dash_direction_t.OUTBOUND) {