Open blp opened 4 years ago
I don't have a great answer for this. I think the idea was to reserve Preamble
for "top-level" P4 objects which expose a control-plane API, and for which the ids share the same number space (https://github.com/p4lang/p4runtime/blob/6a457c2eb594a09c60a2930c93b552e85e816daa/proto/p4/config/v1/p4info.proto#L115-L124). Match fields - as well as action parameters - indeed use a local scope for their ids (local to the table / the action). That doesn't mean we couldn't use the same Preamble
Protobuf message since syntactically we include the same information, but I believe the idea was to emphasize the different between the 2 by not using the same message.
The
MatchField
message contains everything inPreamble
except foralias
. It's not clear to me whyMatchField
doesn't just use Preamble. Perhaps it is because theid
is scoped differently, but I'm not sure about that.