Enable printing of packet in/out contents during BMv2 tests#5341
Enable printing of packet in/out contents during BMv2 tests#5341jafingerhut wants to merge 2 commits intop4lang:mainfrom
Conversation
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
|
OK, I recall now a few months back that enabling this causes BMv2 to assert and crash if it sends out a length 0 packet, which a few test cases do. There is a fix committed to avoid this assert in BMv2 here p4lang/behavioral-model@d12eefc However, p4c tests using BMv2 are I believe still using a BMv2 binary built from source code circa Aug 2023 or thereabouts, until we update p4c CI to do otherwise. The good news is that hopefully quite soon we should have a part-time professional to help improve such things, but of course others are always welcome to tackle such issues if they are interested. |
We could just build BMv2 from scratch, like it is done for the Fedora build. But that would CI time and could possibly break... |
I think it is fine to wait just a bit longer until our new hired CI help can consider how they would like to address it. |
It is true that packets in/out are recorded to pcap files during BMv2 tests, and this is definitely useful. I am currently debugging an issue in recently built open source P4 code where the packets recorded in the pcap files seem to be different than what is logged by BMv2 with the
--dump-packet-data 10240option given to BMv2, so it can be very useful to have this enabled all of the time.The cost for enabling it is just a few extra lines in the BMv2 log files, typically two extra lines per packet, where typically there are hundreds of lines of log file output per packet for other (useful) reasons, so enabling this option is a negligible extra overhead in logging.