tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Sending packets from switch to controller using P4runtime exercise

Open p4pifor opened this issue 4 years ago • 2 comments

I would like to send packets from the switch to the controller so as the last one carries out some actions with the received packets. How can I do it using p4runtime exercise? I know I must modify mycontroller.py script and add there the actions I wanna carry out when receiving the packet. However, I don't know how to send the packet to the controller's port and make the controller listen and receive packets in this port. Thanks in advance

p4pifor avatar Aug 01 '21 16:08 p4pifor

Hello, do you know how to do it?

1101293857 avatar Dec 25 '21 03:12 1101293857

I do not have any suggested way to do it based on the code in this tutorials repository, but there is a way using the code in the file testlib/base_test.py and a P4 program and Python3 test that uses the PTF library in this directory of another repository of mine: https://github.com/jafingerhut/p4-guide/tree/master/ptf-tests/packetinout

jafingerhut avatar Dec 29 '21 02:12 jafingerhut