stratum / fabric-tna

The SD-Fabric data plane
https://docs.sd-fabric.org/
31 stars 15 forks source link

Error during runtime based onos meter example #533

Open YangBaylee opened 1 year ago

YangBaylee commented 1 year ago

Hello, everyone,as a beginner in this field and I would like to consult you experts about a question.I try to implement an onos meter example based on p4 meter in the dataplane. I read the repo of fabric-tna, and then according to the code of fabric-tna, I implemented a simple p4 program and a control plane program for onos to deliver meter configuration, but onos reported an exception during the operation, as shown in the figure. runtime_error I checked the code carefully again. I found that the difference between my code and fabric-tna is that my code doesn't add the UPFProgrammable.class and its related implementation in pipeconf. I don’t know if it can solve the issue in my code if i add this part.

     I also read the repo of up4, the meter operation in it is very different from fabric-tna. It implements a MeterListener, and sends MeterRequest when MeterEvent is processed. I don't know when will invoke the MeterListener event ? And when the Meter event is triggered, who configures the meter configuration?

basic.p4.txt Forwarding.java.txt

Dscano commented 1 year ago

Hi @YangBaylee

From what I'm undestanding you haven't implemented the pieconf files needed to handle the pipeline that you have installed in the switches, you have only defined the Forwarding behaviour. So you have also to create this files (https://github.com/stratum/fabric-tna/blob/main/src/main/java/org/stratumproject/fabric/tna/PipeconfLoader.java,https://github.com/stratum/fabric-tna/tree/main/src/main/java/org/stratumproject/fabric/tna/behaviour/pipeliner)

Best, Davide

YangBaylee commented 1 year ago

Thank you, Davide🙂!