p4lang / tutorials

P4 language tutorials
Apache License 2.0
1.36k stars 887 forks source link

Error:: source of modify_field invalid #486

Closed QingQingR closed 2 years ago

QingQingR commented 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); }

jnfoster commented 2 years ago

Hi. Please ask this question to Intel. This is not the right forum for asking questions about proprietary P4 implementations like Tofino.