You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool runs into errors for PcapPlusPlus and Scapy backends when the defined parser in P4 program contains a default transition to the next parser state. The type of error varies depending on how the default transition is:
Default transition via a transition select block: In this case the error is TypeError: 'NoneType' object has no attribute '__getitem__'
Default transition which is directly specified like transition parse_next_state: In this case the error is KeyError: u'bos'. Here the p4c compiler would merge the parser states and the said transition actually doesn't exist. This is a right thing to do from P4 perspective, but it confuses the tool.
Attached zip contains:
perc-tcp-options.p4: by default it is a working P4 file. Follow comments around "BUGGY Line #1" and "BUGGY Line #2" to reproduce the two error respectively. Reproduce only one error at a time.
graphs/ParseGraph-works.pdf: a working parser graph
graphs/ParseGraph-bug_line1.pdf: parser graph corresponding to the first error.
graphs/ParseGraph-bug_line2.pdf: parser graph corresponding to the second error.
Setup:
TrafficTool at dedb485, python2.7.17, p4c installed via ppa.
Unable to reproduce 1.
Reproduced 2. It works for pCap++ when we don't use the standard headers, so that's where the root cause could be. Looking into it
The tool runs into errors for PcapPlusPlus and Scapy backends when the defined parser in P4 program contains a default transition to the next parser state. The type of error varies depending on how the default transition is:
Default transition via a transition select block: In this case the error is
TypeError: 'NoneType' object has no attribute '__getitem__'
Default transition which is directly specified like
transition parse_next_state
: In this case the error isKeyError: u'bos'
. Here the p4c compiler would merge the parser states and the said transition actually doesn't exist. This is a right thing to do from P4 perspective, but it confuses the tool.Attached zip contains:
perc-tcp-options.zip
The text was updated successfully, but these errors were encountered: