Hello,
I am trying figure out the necessary steps needed to write an ONOS app to push a P4 program on to a physical Stratum Tofino switch.
I get the following error while attempting to push the pipeline using netcfg.
INVALID_ARGUMENT: Unknown format for p4_device_config.I verified that the same P4 program can be pushed to the physical Tofino switch running Stratum using the p4lang/p4runtime-shell successfully.
Probably, there is some mistake in the how the P4 compiler outputs are being packaged in the pipeconf/Pipeconfloader.java.
private PiPipeconf buildPipeconf() throws P4InfoParserException {
final URL p4InfoUrl = PipeconfLoader.class.getResource(P4INFO_PATH);
final URL tofinoBinUrl = PipeconfLoader.class.getResource(TOFINO_BIN_PATH);
final URL tofinoContextJsonPathUrl = PipeconfLoader.class.getResource(TOFINO_CONTEXT_JSON_PATH);
final PiPipelineModel pipelineModel = P4InfoParser.parse(p4InfoUrl);
return DefaultPiPipeconf.builder()
.withId(PIPECONF_ID)
.withPipelineModel(pipelineModel)
.addBehaviour(PiPipelineInterpreter.class, InterpreterImpl.class)
.addBehaviour(Pipeliner.class, PipelinerImpl.class)
.addExtension(P4_INFO_TEXT, p4InfoUrl)
.addExtension(TOFINO_BIN, tofinoBinUrl)
.addExtension(TOFINO_CONTEXT_JSON, tofinoContextJsonPathUrl)
.build();
} Any suggestions or debugging tips would be really helpful.
Please see my previously posted query for more on this -
https://groups.google.com/a/onosproject.org/g/onos-dev/c/9VGmfYGqmNkThanks,
Prashanth