When I use the make command to compile P4 code and issue flow rules to the switch. The following error occurred while configuring the switch:
Configuring switch s11 using P4Runtime with file ./sw_rules/s11-runtime.json
- Using P4Info file build/ddosmit.p4.p4info.txt...
- Connecting to P4Runtime server on 127.0.0.1:50051 (bmv2)...
- Setting pipeline config (build/ddosmit.json)...
- Inserting 25 table entries...
- MyIngress.ipv4_lpm: (default action) => MyIngress.drop()
Traceback (most recent call last):
File "./utils/run_exercise.py", line 396, in <module>
exercise.run_exercise()
File "./utils/run_exercise.py", line 207, in run_exercise
self.program_switches()
File "./utils/run_exercise.py", line 309, in program_switches
self.program_switch_p4runtime(sw_name, sw_dict)
File "./utils/run_exercise.py", line 284, in program_switch_p4runtime
proto_dump_fpath=outfile)
File "/home/zwx/p4/ddosmitigation/utils/p4runtime_lib/simple_controller.py", line 129, in program_switch
insertTableEntry(sw, entry, p4info_helper)
File "/home/zwx/p4/ddosmitigation/utils/p4runtime_lib/simple_controller.py", line 150, in insertTableEntry
sw.WriteTableEntry(table_entry)
File "/home/zwx/p4/ddosmitigation/utils/p4runtime_lib/switch.py", line 101, in WriteTableEntry
self.client_stub.Write(request)
File "/usr/local/lib/python2.7/dist-packages/grpc/_interceptor.py", line 221, in __call__
compression=compression)
File "/usr/local/lib/python2.7/dist-packages/grpc/_interceptor.py", line 257, in _with_call
return call.result(), call
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 343, in result
raise self
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = ""
debug_error_string = "{"created":"@1681200476.604114880","description":"Error received from peer ipv4:127.0.0.1:50051","file":"src/core/lib/surface/call.cc","file_line":1070,"grpc_message":"","grpc_status":2}"
>
utils/Makefile~:27: recipe for target 'run' failed
make: *** [run] Error 1
The result I hope to achieve is that the topology is successfully built and the specified flow rules are distributed to the corresponding switches.
The only time I've come across such an error was when I tried to insert two conflicting rules. E.g. consider the following table:
As I tried to insert two rules with the same
unsigned_int_field, same actionforward, but different action parameters, it threw the error you described.Could this be what is happening in your case?