-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logical port CONTROLLER for Tofino switch connected to ONOS via Stratum #529
Comments
Hi @endrigoshi
|
Hi @Dscano Thank you very much for the prompt response!
Lastly, I would appreciate your input in understanding the IN_PORT values that I mentioned in the first comment. Thank you again for your help! :) |
|
Hi @Dscano Maybe I am failing to understand your point, but I will try to express myself again:
Therefore, regarding your comment above, how can it be that the flow rule is not compliant with the pipeline when I have not done any changes to the pipeline or the control plane code? This is also what I meant when I asked if Now, regarding the second point, I believe that the escamotage that you mention refers to the definition of Thank you again for your help. Best, |
Hi @endrigoshi, did you have also install the application https://github.com/opennetworkinglab/trellis-control on the ONOS controller?, according to the guide https://docs.sd-fabric.org/master/release/1.2.0.html.
I thought you had pushed a custom flow rule. Just to give you an idea, if you push a flow rule with a wrong action name or with an extra match field the flow rules in the controller view remains in pending_add status.
yes, exactly. Best |
Hi @endrigoshi, fabric-tna/src/main/java/org/stratumproject/fabric/tna/behaviour/pipeliner/FabricPipeliner.java Lines 213 to 226 in fd3c3f0
About the output port issue, which version of SD-Fabric components are you using? Are you using released SD-Fabric ONOS? The issue might be related to this change: https://gerrit.onosproject.org/c/onos/+/25232, please verify that you have it in your code base. Thanks, |
Hi, Thank you both for your help. I am using ONOS 2.7.0 so I believe the issue with the long port numbers is already fixed there. Thanks, |
I also wanted to ask you another question regarding the forwarding to CPU_PORT. Please let me know if its better to open another issue in the I am using ONOS and As far as the setup goes, Tofino is connected through the management port to the same network as the PC where ONOS is running. Then, another PC is connected to Tofino and serves as a packet generator. Do you have any idea if I am doing anything wrong? I have tried many things by I am completely lost at this point. |
Hi @endrigoshi This is strange, have you tried to sniff tha packet at the controller side? |
Hi @Dscano , Yes I tried running I am using The
So I am not doing any special processing to the packet. The management interface of Tofino is connected to switch which in turn is connected to the network. Can it be that the packet is dropped at this switch? As far as stratum goes, I am using the |
yes, I believe that the forwarding if handeld by the ip protocol/ in a traditional way.
This could be the problem, because you are generating traffic that does not belong/is handeld by your management network. While the packet_in and packet_out sent by the controller to the data plane have the ip address and mac of the machine where the SDN controller is running. You should try to remove the switch or generate traffic with ip and mac same as those of the machine where the controller runs. |
But only the management interface of the Tofino is connected to this "normal" switch, while the PC that generates traffic is connected directly to Tofinos forwarding ports. What what puzzles me is the fact that if Stratum is taking care of wrapping the PacketIns with the correct headers (meaning the dst IP/MAC of ONOS), the packet should have no problem being forwarded in a non-programmable switched network. Otherwise it would basically beat the purpose of having remote controllers. I tried crafting new packets as per your suggestion but the behavior was the same. I will also try to connect the management port of Tofino directly to ONOS, but while I hope it works I am a bit skeptical. |
Sorry @endrigoshi , let me explain better. When ONOS send LLDP packets for discovering the network, it leverages packetio mechanism to send and recieve LLDP packet. In this case the header fields are consistent from the traditional ip forwarding point of view and yhose packets are forwarding in the menangement network. I experience that in my experiments. So, stratum does not apply any header fields modification, it exposes the APIs (P4Runtime, gNMI, gNOI) to the controller, the packets are managed by the P4 data plane, so there you have to properly fill the packet headers fields, in order to be managed by a traditional network. |
@endrigoshi |
Hi @Dscano , My understanding of the setup with Tofino, Stratum and ONOS is as follows (based on the knowledge I have with OpenFlow networks and other P4 networks):
Now, to get back to my problem. The ONOS -> Stratum -> Tofino part of the communication work fine, at least the parts that take care of loading the pipeline and deploying the flow-rules (so the transparent part of the communication). I am not sure if sending PacketOuts would work cuz I have to modify the ONOS code to be able to test that. However, I am sure that the "uplink" part (PacketIn sent from Tofino -> Stratum -> ONOS) does not work since there is nothing transmitted to my ONOS application. Below, I will explain some details about my setup and what I have learned from debugging this issue. The OS running on top of Tofino is as follows:
I have installed Now, in Tofino I can see two interfaces: The output from Stratum container is as follows:
I have also run it with the flags I would really appreciate if you can point me towards the differences between your setup (which I believe works as intended) and mine. Best, Edit: Updated the stratum output to show the full logs, including the output of adding the pipeline and rules from ONOS. |
In case it helps, the contents of
and
|
Hi @endrigoshi
|
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: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
, orIN_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!
The text was updated successfully, but these errors were encountered: