[P4-dev] Error when trying to declare a header stack

lee cyrus LEE_LOKYIN_c2 at lab.ntt.co.jp
Tue Dec 11 02:50:22 EST 2018


Hi,


According to the P4 14 language spec to declare a header stack you do:

header_type outer_ipv4_t {
     fields {
         version  : 4;
         ihl      : 4;
         diffserv : 8;
         totalLen : 16;
         pktId    : 16;
         flags    : 3;
         fragOffset : 13;
         ttl      : 8;
         protocol : 8;
         hdrChecksum : 16;
         srcAddr  : 32;
         dstAddr  : 32;
     }
}

header_type outer_udp_t {
     fields {
         srcPort : 16;
         dstPort : 16;
         dgLength  : 16;
         checksum : 16;
     }
}

header outer_ipv4_t outer_ipv4[6];

header outer_udp_t outer_udp[6];


When only ipv4 was declared as header stack, no error generated.

However, when I also set udp as header stack, an error like below pops out.


Python error: Traceback (most recent call last):

File "C:\NFP_SDK_6.0.4\bin\py\gui\P4\PSBuild.py", line 273, in PSGeneratePIF

pcs.Debuginfo, pcs.MACIngressTimestamp, verbose=verbose, 
genParseGraph=False)

File "C:\NFP_SDK_6.0.4\bin\py\gui\P4\Build.py", line 128, in GeneratePIF

pifOutMod.compile()

File ".\generator.py", line 89, in compile

File ".\parrep.py", line 107, in post_compile

File ".\parrep.py", line 1073, in handle_parser_md_writes

File ".\parrep.py", line 384, in parse_metadata_writes

TypeError: %d format: a number is required, not str


I am not sure this is error from P4 or Netronome Programmer Studio. 
Sorry if this is Programmer Studio issue.


Thanks,

Cyrus




More information about the P4-dev mailing list