[P4-dev] complex function like pattern matching
y2924uki at gmail.com
Thu Apr 6 04:01:12 EDT 2017
Thanks for your response.
1) I am using mininet(simple_switch.cpp) to be my environment,
so I want to know where should I implement my C/C++ code? (
2) Is there anything I should pay special attention to? ( like:
restrictions of compiler )
On Mon, Apr 3, 2017 at 8:35 AM, Andy Fingerhut <andy.fingerhut at gmail.com>
> The P4 language is focused on parsing and manipulating packet headers, not
> One could write a custom extension that could search for patterns in a
> payload, but it would be non-portable, and would have to be implemented in
> a target-specific language, e.g. C/C++ for a software model, Verilog for an
> ASIC or FPGA, etc. It would be similar to having a library written in
> assembler and calling it from C, with the assembler implemented anew for
> each target processor.
> On Mon, Mar 27, 2017 at 9:13 AM, yunchen chang <y2924uki at gmail.com> wrote:
>> Hello everyone,
>> I am doing an experiment for DPI in P4.
>> (detect packet label in data plane, not in controller)
>> I need some complex funtcions like lookup the host name of payload.
>> host_name: tw.yahoo.com
>> mtach_key: .yahoo.
>> I plan to write function in "primitives.cpp" at first.
>> But after I read this posted : [http://lists.p4.org/pipermail
>> /p4-dev_lists.p4.org/2016-August/000449.html], it pointed that P4 can't
>> implement "pattern matching".
>> I want to know is there any solution in current P4?
>> (or any suggestion)
>> Thank you.
>> Best regards,
>> P4-dev mailing list
>> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev