master-thesis/p4debug/bug2-cast-in-checksum
2019-03-06 19:55:04 +01:00
..
checksums.p4 syntax correct 2019-03-06 19:52:27 +01:00
headers.p4 Try to reproduce casting bug 2019-03-06 19:47:59 +01:00
parsers.p4 Try to reproduce casting bug 2019-03-06 19:47:59 +01:00
README Add readmes, add .json extension 2019-03-06 19:55:04 +01:00
settings.p4 Try to reproduce casting bug 2019-03-06 19:47:59 +01:00
static-mapping.p4 Try to reproduce casting bug 2019-03-06 19:47:59 +01:00

How to reproduce:

cd master-thesis/p4app
sudo p4run --config bug2-cast-in-checksum.json

Result:

...

*** Starting 2 switches
s1 Starting P4 switch s1.
simple_switch -i 1@s1-eth1 -i 2@s1-eth2 -i 3@s1-eth3 -i 4@s1-eth4 -i 5@s1-cpu-eth0 --pcap=/home/p4/master-thesis/p4app/pcap --thrift-port 9090 --nanolog ipc:///tmp/bm-1-log.ipc --device-id 1 ../p4debug/bug2-cast-in-checksum/static-mapping.json --log-console >/home/p4/master-thesis/p4app/log/s1.log


Logfile:


p4@ubuntu:~/master-thesis/p4app$ cat /home/p4/master-thesis/p4app/log/s1.log
Warning: you requested the nanomsg event logger, but bmv2 was compiled without -DBMELOG, and the event logger cannot be activated
Calling target program-options parser
Unsupported input type 'expression' for calculation 'calc'
bad json:
{
   "type" : "expression",
   "value" : {
      "left" : {
         "type" : "field",
         "value" : [ "ipv6", "payload_length" ]
      },
      "op" : "&",
      "right" : {
         "bitwidth" : 32,
         "type" : "hexstr",
         "value" : "0xffffffff"
      }
   }
}

p4@ubuntu:~/master-thesis/p4app$