Adjust headers to work with netpfga #1
make[1]: Entering directory '/home/nico/master-thesis/netpfga/minip4/src' p4c-sdnet -o minip4.sdnet --sdnet_info .sdnet_switch_info.dat minip4_solution.p4 headers.p4(12): error: Duplicate declaration of port_t; previous at typedef bit<9> port_t ^^^^^^ /opt/xilinx/SDNet/2018.2/data/p4include/sume_switch.p4(37) typedef bit<8> port_t; ^^^^^^ headers.p4(12): error: port_t: Duplicates declaration port_t typedef bit<9> port_t; ^^^^^^ /opt/xilinx/SDNet/2018.2/data/p4include/sume_switch.p4(37) typedef bit<8> port_t; ^^^^^^ error: 2 errors encountered, aborting compilation make[1]: *** [Makefile:5: all] Error 1 make[1]: Leaving directory '/home/nico/master-thesis/netpfga/minip4/src' make: *** [Makefile:31: frontend] Error 2
This commit is contained in:
parent
2130f14d02
commit
b8897a7b35
1 changed files with 8 additions and 1 deletions
|
@ -4,12 +4,19 @@
|
||||||
|
|
||||||
#include <core.p4>
|
#include <core.p4>
|
||||||
|
|
||||||
|
/**************************************** NetPFGA ****************************************/
|
||||||
|
|
||||||
|
/* already defined in sume_switch.p4 */
|
||||||
|
#ifndef _SUME_SWITCH_P4_
|
||||||
|
typedef bit<9> port_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**************************************** types ****************************************/
|
/**************************************** types ****************************************/
|
||||||
|
|
||||||
typedef bit<48> mac_addr_t;
|
typedef bit<48> mac_addr_t;
|
||||||
typedef bit<32> ipv4_addr_t;
|
typedef bit<32> ipv4_addr_t;
|
||||||
typedef bit<128> ipv6_addr_t;
|
typedef bit<128> ipv6_addr_t;
|
||||||
typedef bit<9> port_t;
|
|
||||||
typedef bit<16> mcast_t;
|
typedef bit<16> mcast_t;
|
||||||
typedef bit<16> task_t;
|
typedef bit<16> task_t;
|
||||||
typedef bit<16> table_t; /* to map debug messages - 16 bit to match shortenumfield */
|
typedef bit<16> table_t; /* to map debug messages - 16 bit to match shortenumfield */
|
||||||
|
|
Loading…
Reference in a new issue