How can I access registers from the control plane when using Bmv2 + Mininet

It seems that PI does not support register access yet. Someone can help?

If someone is willing to work on this issue in the p4lang/PI repository and make the necessary enhancements, this feature would work. There haven’t been any volunteers on this issue: Support to read & write Register by PI · Issue #376 · p4lang/PI · GitHub

1 Like

Thanks for your reply. I happen to find that I can access registers in bmv2 through Thrift. Since further experiments may be performed in Tofino. I wonder Thrift-based control can be used in Tofino. Can you tell me? Thank you very much!

I have heard that the Thrift-based control plane API in bmv2 is custom to bmv2 simple_switch.
Tofino has its own BFRT runtime API that supports reading and writing registers, as well as control of all other externs and tables.

If accessing the registers is not implemented yet, I wonder if @RickJager could read a register first and then send it as part of the packet. For instance, create a custom header that is appended to the PACKET_IN sent to the control plane or just forward it to another host (if you just want to check the value, for debugging purposes). That might work, but not sure.

Cheers :slight_smile:

Get it. Thank you for your help!

Thanks! I will try this if possible.

I think this documentation would help you.