Hello,
I am writing a P4 program in bmv2. I would like that P4 sends this information(including throughput and flow_id) by using digest + thrift to controller and set meter based on this digest.
I have already finish the function for get throughput and write digest in data plane, but when I try to write controller.py to receive the information, I always see the error: nnpy.errors.NNerror: Invalid argument.
I print the socket path and it shows ’ ', which means empty. What should I do to let the controller get correct socket path for specific P4 switch?
Here is my code part for get socket path in controller.py:
sock_path = sw.client.bm_mgmt_get_info().notifications_socket
sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
sub.connect(sock_path)
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, b’')
print(“Connected to”, sock_path)
Thanks,
Yuexin.