fabric-tna icon indicating copy to clipboard operation
fabric-tna copied to clipboard

Logical port CONTROLLER for Tofino switch connected to ONOS via Stratum

Open endrigoshi opened this issue 1 year ago • 17 comments

Hi all,

I am using a Tofino switch to deploy my own P4 program using ONOS and Stratum. First, I have started with the deployment of the fabric-tna program so that I understand how everything works.

However, after building the fabric profile and following all the other steps to create the pipeconf, I get the following error after adding the netcfg:

2022-11-20T17:49:47,390 | WARN  | GroupDriverProvider-0 | P4RuntimeReplicationGroupProgrammable | 221 - org.onosproject.onos-protocols-grpc-utils - 2.7.0 | Unable to translate replication group, aborting ADD operation: interpreter cannot
 map logical port CONTROLLER [DefaultGroup{description=DefaultGroup{deviceId=device:milantofino, type=CLONE, buckets=GroupBuckets{buckets=[DefaultGroupBucket{type=CLONE, treatment=DefaultTrafficTreatment{immediate=[OUTPUT:CONTROLLER], de
ferred=[], transition=None, meter=[], cleared=false, StatTrigger=null, metadata=null}, packets=0, bytes=0}]}, appId=DefaultApplicationId{id=174, name=org.stratumproject.fabric-tna}, appCookie=0x02FE07, givenGroupId=511}, groupid=GroupId{
id=0x1ff}, state=PENDING_ADD_RETRY, age=0}]

All the other flow-rules are added correctly and this is the only one that is stuck in PENDING_RETRY_ADD.

I also have another question regarding the way the port numbers are shown in fabric-tna. For example, I see these type of match criteria: IN_PORT:4294967040, vlan_is_valid=0x0, or IN_PORT:4294967040, ip_eth_type=0x800. What do the values for IN_PORT represent?

Lastly, do you have any information how I can forward a packet to ONOS from Tofino? What should be the CPU_PORT value defined in the P4 program?

Thank you in advance!

endrigoshi avatar Nov 20 '22 17:11 endrigoshi