xxx.p4.p4info.txt is empty
zwx0925 opened this issue · comments
After using the "make" command, the file "xxx.p4.p4info.txt" is empty. So when configuring the switch, an error was reported as"AttributeError: Could not find 'MyIngress.ipv4_lpm' of type tables ". I don't know where the problem is, and I am very distressed, so I want to seek everyone's help.
The error details are as follows:
mkdir -p build pcaps logs
sudo python ./utils/run_exercise.py -t topology.json -b simple_switch_grpc
Reading topology file.
Building mininet topology.
Switch port mapping:
s11: 1:h1 2:s31
s21: 1:h2 2:s31
s31: 1:s11 2:s21 3:s51
s41: 1:h4 2:s51
s51: 1:h99 2:s31 3:s41
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
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/p4/ddosmitigation/utils/p4runtime_lib/simple_controller.py", line 129, in program_switch
insertTableEntry(sw, entry, p4info_helper)
File "/home/p4/ddosmitigation/utils/p4runtime_lib/simple_controller.py", line 148, in insertTableEntry
priority=priority)
File "/home/p4/ddosmitigation/utils/p4runtime_lib/helper.py", line 168, in buildTableEntry
table_entry.table_id = self.get_tables_id(table_name)
File "/home/p4/ddosmitigation/utils/p4runtime_lib/helper.py", line 64, in
return lambda name: self.get_id(primitive, name)
File "/home/p4/ddosmitigation/utils/p4runtime_lib/helper.py", line 50, in get_id
return self.get(entity_type, name=name).preamble.id
File "/home/p4/ddosmitigation/utils/p4runtime_lib/helper.py", line 45, in get
raise AttributeError("Could not find %r of type %s" % (name, entity_type))
AttributeError: Could not find 'MyIngress.ipv4_lpm' of type tables
utils/Makefile~:27: recipe for target 'run' failed
make: *** [run] Error 1
It appears you've modified the P4 program in the tutorials and are now experiencing an error. Let me suggest that you ask your question on the P4 Forum instead? Issues on this repository are really only for problems with the (unmodified) tutorial exercises.