Skip to content

Update code generation per changes in P4-16 Syntax #21

@pradeepdogga

Description

@pradeepdogga

Hi all,

The following are the minimum required changes to make marple generated p4 code to compile with p4c compiler due to changes in p4-16 spec. I have not run a comprehensive test to see if these are the only changes required, but they seem to be working with many queries.

All Table Definitions (No parameters and parentheses in new syntax):

table ipv4_match(out IPv4Address nextHop)
should be changed to:
IPv4Address nextHop;
table ipv4_match

Ref: p4lang/p4-spec#153

control Verify (Different direction of parameters):

control Verify(in Headers hdrs, inout Metadata meta)
should be changed to:
control Verify(inout Headers hdrs, inout Metadata meta)

Ref: Will try to find and update

Thanks,
Pradeep.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions