Dear all
When trying to reproduce the operation of QCMP, following the procedure indicated in the Getting Started section of the readme, I am getting the following stack trace when calling the get_queues_layer1.py script at h2 host:
root@p4:/tutorials/QCMP# ./set_switches.sh
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
sniffing on s1-eth3
s1 [55, 45] 0 [100, 0]
Traceback (most recent call last):
File "receive_queues.py", line 172, in
main()
File "receive_queues.py", line 168, in main
sniff(filter="ip", iface = iface,
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 1311, in sniff
sniffer._run(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 1254, in _run
session.on_packet_received(p)
File "/usr/local/lib/python3.8/dist-packages/scapy/sessions.py", line 109, in on_packet_received
result = self.prn(pkt)
File "receive_queues.py", line 169, in
prn = lambda x: handle_pkt(x, s1_q_table, s2_q_table, s3_q_table, path_dicts, counter, reset_params))
File "receive_queues.py", line 120, in handle_pkt
runthat(s1_q_table, s1, mri, path_dicts, counter, 0, 2, 1, diff_switches, nhop_dmacs, nhop_ipv4s, ports, reset_params)
File "receive_queues.py", line 88, in runthat
new_paths.change_path_weights(old_paths[index1], p4info_helper, switch, nhop_dmacs, nhop_ipv4s, ports)
File "/home/p4/tutorials/QCMP/q_table.py", line 109, in change_path_weights
update_path_weights(p4info_helper, ingress_sw=ingress_sw, value=i,
File "/home/p4/tutorials/QCMP/q_table.py", line 153, in update_path_weights
ingress_sw.ModifyTableEntry(table_entry)
AttributeError: 'Bmv2SwitchConnection' object has no attribute 'ModifyTableEntry'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
root@p4:/tutorials/QCMP#
Actually, the problem seems to be at line 153 of the q_table.py script, since it is calling the ModifyTableEntry of the Bmv2SwitchConnection object, which does not seem to be defined.
I have tested the code in two releases of the P4 Tutorial Machine: 02-04-2024 and 01-07-2023
I look forward to any further debugging steps I can try.
Thanks in advance for your attention.
Dear all
When trying to reproduce the operation of QCMP, following the procedure indicated in the Getting Started section of the readme, I am getting the following stack trace when calling the get_queues_layer1.py script at h2 host:
root@p4:
/tutorials/QCMP# ./set_switches.sh/tutorials/QCMP#Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: RuntimeCmd:
sniffing on s1-eth3
s1 [55, 45] 0 [100, 0]
Traceback (most recent call last):
File "receive_queues.py", line 172, in
main()
File "receive_queues.py", line 168, in main
sniff(filter="ip", iface = iface,
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 1311, in sniff
sniffer._run(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 1254, in _run
session.on_packet_received(p)
File "/usr/local/lib/python3.8/dist-packages/scapy/sessions.py", line 109, in on_packet_received
result = self.prn(pkt)
File "receive_queues.py", line 169, in
prn = lambda x: handle_pkt(x, s1_q_table, s2_q_table, s3_q_table, path_dicts, counter, reset_params))
File "receive_queues.py", line 120, in handle_pkt
runthat(s1_q_table, s1, mri, path_dicts, counter, 0, 2, 1, diff_switches, nhop_dmacs, nhop_ipv4s, ports, reset_params)
File "receive_queues.py", line 88, in runthat
new_paths.change_path_weights(old_paths[index1], p4info_helper, switch, nhop_dmacs, nhop_ipv4s, ports)
File "/home/p4/tutorials/QCMP/q_table.py", line 109, in change_path_weights
update_path_weights(p4info_helper, ingress_sw=ingress_sw, value=i,
File "/home/p4/tutorials/QCMP/q_table.py", line 153, in update_path_weights
ingress_sw.ModifyTableEntry(table_entry)
AttributeError: 'Bmv2SwitchConnection' object has no attribute 'ModifyTableEntry'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
Exception ignored in: <function _Rendezvous.del at 0x7fc718a0f550>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 495, in del
AttributeError: 'NoneType' object has no attribute 'StatusCode'
root@p4:
Actually, the problem seems to be at line 153 of the q_table.py script, since it is calling the ModifyTableEntry of the Bmv2SwitchConnection object, which does not seem to be defined.
I have tested the code in two releases of the P4 Tutorial Machine: 02-04-2024 and 01-07-2023
I look forward to any further debugging steps I can try.
Thanks in advance for your attention.