Closed QingQingR closed 2 years ago
Environment: bfrt-tofino programmable switch, bfrt-sde-9.2.0
The code: Register<bit<32>,bit<32>>(KEY_SIZE) val0; Register<bit<32>, bit<32>, bit<32>>(val0) val_read_cmp_action = { void apply(inout bit<32> value, out bit<32> read_value) { if(mdata.v0 > value){ read_value = value; value = mdata.v0; } } }; action take_val0(){ mdata.v0=val_read_cmp_action(hdr.val.idx); }
Hi. Please ask this question to Intel. This is not the right forum for asking questions about proprietary P4 implementations like Tofino.
Environment: bfrt-tofino programmable switch, bfrt-sde-9.2.0
The code: Register<bit<32>,bit<32>>(KEY_SIZE) val0; Register<bit<32>, bit<32>, bit<32>>(val0) val_read_cmp_action = { void apply(inout bit<32> value, out bit<32> read_value) { if(mdata.v0 > value){ read_value = value; value = mdata.v0; } } }; action take_val0(){ mdata.v0=val_read_cmp_action(hdr.val.idx); }