On Mon, 2 Feb 2026 12:36:52 +0100 Lukas Sismis <[email protected]> wrote:
> This series extracts the testpmd flow CLI parser into a reusable library, > enabling external applications to parse rte_flow rules using testpmd syntax. > > Motivation > ---------- > External applications like Suricata IDS [1] need to express hardware filtering > rules in a consistent, human-readable format. Rather than inventing custom > syntax, reusing testpmd's well-tested flow grammar provides immediate > compatibility with existing documentation and user knowledge. > > Note: This library provides only one way to create rte_flow structures. > Applications can also construct rte_flow_attr, rte_flow_item[], and > rte_flow_action[] directly in C code. > > Design > ------ > The library (librte_flow_parser) exposes the following APIs: > - rte_flow_parser_parse_attr_str(): Parse attributes only > - rte_flow_parser_parse_pattern_str(): Parse patterns only > - rte_flow_parser_parse_actions_str(): Parse actions only > > Testpmd is updated to use the library, ensuring a single > maintained parser implementation. > > Testing and Demo > ------- > - Functional tests in dpdk-test > - Example application: examples/flow_parsing I am working on being able to use null PMD to exercise rte_flow. Will add another automated test to exercise flow parser in automated test.

