6765b878c2
To make the switch compile. Current error: *** 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 ../p4src/static-mapping.json --log-console >/home/p4/master-thesis/p4app/log/s1.log P4 switch s1 did not start correctly. Check the switch log file. 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 [12:24:10.407] [bmv2] [D] [thread 13263] Set default default entry for table 'MyIngress.v6_addresses': NoAction - [12:24:10.407] [bmv2] [D] [thread 13263] Set default default entry for table 'MyIngress.v6_networks': NoAction - [12:24:10.407] [bmv2] [D] [thread 13263] Set default default entry for table 'MyIngress.v4_networks': NoAction - [12:24:10.408] [bmv2] [D] [thread 13263] Set default default entry for table 'tbl_act': act - Invalid entry type 'expression' in field list bad json: { "type" : "expression", "value" : { "type" : "expression", "value" : { "left" : null, "op" : "d2b", "right" : { "type" : "field", "value" : [ "scalars", "metadata.calc_icmp6_checksum" ] } } } } p4@ubuntu:~/master-thesis/p4app$
40 lines
1.3 KiB
Text
40 lines
1.3 KiB
Text
/* -*- P4_16 -*- */
|
|
#ifndef CHECKSUMS_P4
|
|
#define CHECKSUMS_P4
|
|
|
|
#include <core.p4>
|
|
#include <v1model.p4>
|
|
|
|
#include "headers.p4"
|
|
|
|
/*************************************************************************
|
|
************* C H E C K S U M V E R I F I C A T I O N *************
|
|
*************************************************************************/
|
|
|
|
control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
|
|
apply {}
|
|
}
|
|
|
|
/*************************************************************************
|
|
************** C H E C K S U M C O M P U T A T I O N **************
|
|
*************************************************************************/
|
|
|
|
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
|
|
apply {
|
|
// GRRRRR update_checksum_with_payload(meta.calc_icmp6_checksum,
|
|
// GRRRRR {
|
|
// GRRRRR hdr.ipv6.src_addr, /* 128 */
|
|
// GRRRRR hdr.ipv6.dst_addr, /* 128 */
|
|
// GRRRRR 16w0, /* 16 try implicit cast */
|
|
// GRRRRR hdr.ipv6.payload_length, /* 16 */
|
|
// GRRRRR 24w0, /* 24 0's */
|
|
// GRRRRR PROTO_ICMP6 /* 8 */
|
|
// GRRRRR },
|
|
// GRRRRR hdr.icmp6.checksum,
|
|
// GRRRRR HashAlgorithm.csum16
|
|
// GRRRRR );
|
|
}
|
|
}
|
|
|
|
|
|
#endif
|