Skip to content

Commit

Permalink
Remove INVALID mode from DSCP modes (#533)
Browse files Browse the repository at this point in the history
* Remove INVALID mode from DSCP modes

Preserve is the default, there is no condition under which INVALID can be set.

* Update dash_pipeline.p4
  • Loading branch information
marian-pritsak authored Mar 13, 2024
1 parent bf20715 commit a8c5dc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dash-pipeline/bmv2/dash_metadata.p4
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions dash-pipeline/bmv2/dash_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a8c5dc9

Please sign in to comment.