Skip to content
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

connection error #45

Open
P4-WCZ opened this issue Aug 26, 2020 · 5 comments
Open

connection error #45

P4-WCZ opened this issue Aug 26, 2020 · 5 comments

Comments

@P4-WCZ
Copy link

P4-WCZ commented Aug 26, 2020

connection error
The scenario I want to achieve is: execute p4runtime-shell in the ubuntu virtual machine to achieve normal communication with the P4 commercial switch (the switch has been installed with the runtime-server service normally, port 50051). You mentioned at the end that it can support P4 commercial Switch. But I cannot establish a connection normally. The above is the error of the package when executing the script
Can you help me take a look。

@antoninbas
Copy link
Member

I cannot provide technical help with the Tofino switch as I no longer work at Barefoot / Intel, and I no longer have access to the software. I recommend reaching out to customer support if you are having issues using P4Runtime with Tofino. You may want to try and troubleshoot yourself as well, by looking at available logs on the switch.

@Mtze
Copy link

Mtze commented Mar 24, 2021

I had similar problems. Here is what worked for me (SDE 9.4.0 with P4RT support):

  1. Compile your p4 program on the switch using the provided compiler. Generate the p4info.
  2. Modify the run_switchd.sh - Add the --p4rt-server 0.0.0.0:50051 parameter to the actual bf_switchd call
  3. Start the switch with ./run_switchd.sh --skip-p4 -p <yourProgram> (Important to start it with your actual binary AND --skip-p4 - Otherwise the switch seg-faults - don't ask me why 🤷‍♂️)
  4. Optional: Copy context.json, tofino.bin, <program>.p4info.pb.txt to your runtime-shell host
  5. Use the generator script in the repo to create the necessary<yourBin>.bin
  6. Call python3 -m p4runtime_sh --grpc-addr <IP>:50051 --device-id 0 --election-id 0,1 --config <program>.p4info.pb.txt,<yourBin>.bin

Hope that helps :)

@P4-WCZ
Copy link
Author

P4-WCZ commented Mar 25, 2021 via email

@mehdiazf
Copy link

mehdiazf commented Aug 19, 2023

Hello,

I'm facing a similar problem (with SDE 9.7.0). Could you figure out how to resolve the problem @P4-WCZ?
I followed your instructions @Mtze, and here is the status and the error I'm getting.

After "Add the --p4rt-server 0.0.0.0:50051 parameter to the actual bf_switchd call Start the switch with ./run_switchd.sh --skip-p4 -p <yourProgram>" the P4Runtime is listening:
image

Now, when I try to run p4runtime-shell (python3 -m p4runtime_sh --grpc-addr localhost:50051 --device-id 0 --election-id 0,1 --config p4info.pb.txt,out.bin), I get:
image

Then the switch seg-faults with the following error:
image

Can you help me to resolve the issue.
Thanks.

@niloysh
Copy link

niloysh commented Feb 7, 2024

Hello,

I'm facing a similar problem (with SDE 9.7.0). Could you figure out how to resolve the problem @P4-WCZ? I followed your instructions @Mtze, and here is the status and the error I'm getting.

After "Add the --p4rt-server 0.0.0.0:50051 parameter to the actual bf_switchd call Start the switch with ./run_switchd.sh --skip-p4 -p " the P4Runtime is listening: image

Now, when I try to run p4runtime-shell (python3 -m p4runtime_sh --grpc-addr localhost:50051 --device-id 0 --election-id 0,1 --config p4info.pb.txt,out.bin), I get: image

Then the switch seg-faults with the following error: image

Can you help me to resolve the issue. Thanks.

I am facing the same issue. @mehdiazf were you able to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants