[P4-dev] [Simple Switch GRPC] Send packet to switch

Steffen Lindner steffen.lindner at student.uni-tuebingen.de
Mon Sep 24 08:35:41 EDT 2018

Hi all,

i’m trying to send a packet generated at the controller to a switch. I’m using the setup from the p4lang tutorial (mininet and P4 runtime), adjusted the target (simple switch grpc) and added the cpu port in the cli 

simple_switch_grpc -i 1 at s1-eth1 -i 2 at s1-eth2 --pcap /media/sf_Implementation/P4-Implementation/pcaps --nanolog ipc:///tmp/bm-0-log.ipc --device-id 0 --no-p4 --log-console --thrift-port 9090 -- --grpc-server-addr --cpu-port 16

I managed to add table entries on the switch via the controller (so connection shouldn’t be the problem) 

However, when trying to send a packet from the controller to the switch using

def WritePacketOut(self, payload):
    request = p4runtime_pb2.StreamMessageRequest()
    request.packet.payload = payload

    except Exception as e:

i don’t get the message at the switch. I even don’t see a packet in at the port 16.

I’m using the V1Model and have no idea how to proceed. I didn’t find any explanation on how to send packets from the controller to the switch. Could someone give me a hint?

Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180924/24166d4e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP using AMPGpg
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180924/24166d4e/attachment.asc>

More information about the P4-dev mailing list