nsg-ethz / p4-utils

Extension to Mininet that makes P4 networks easier to build
GNU General Public License v2.0
175 stars 65 forks source link

Why SimpleSwitchP4RuntimeAPI doesn't support reading and writing register? #57

Open tang-mouren opened 10 months ago

tang-mouren commented 10 months ago

I'm a beginner to P4 and I'm trying to write a program whose the controller plane needs to get access to registers which are defined in data plane with P4 language. I've tried to use SimpleSwitchP4RuntimeAPI to achieve this function. However, it appeared to me that SimpleSwitchP4RuntimeAPI support getting access to table, counter and meter, except register. I'm confused why SimpleSwitchP4RuntimeAPI is designed like this? If I want to achieve controlling registers in control plane, must I use SimpleSwitchThriftAPI? Is there any way else for I can do?

edgar-costa commented 8 months ago

Hi @tang-mouren

The P4RuntimeAPI has not been updated for awhile, when we added it 1.5 years ago, there was no support for register reading an writing. That does not depend on us but on the official repos.

Did you find if they added that into the RuntimeAPI?