Generic flow API (rte_flow)
Status from this message: Applied, thanks for the great work!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest26 patches 5 repliesApplied
- v425 patches 2 repliesSuperseded
- v325 patches 16 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 25 patches | 18 replies | Superseded | |
| v1 | 22 patches | 29 replies | Superseded |
Changes in v5 from the cover letter
- Fixed compilation regression introduced in v2, caused by new #include directive (rte_flow_driver.h).
- Fixed remaining documentation tables that broke PDF generation (John Mcnamara / rte_flow.rst).
- Fixed testpmd flow command's bit-field handler that filled values in the wrong order on big-endian systems. This change also makes arg_entry_bf_fill() support endian conversion at no additional cost (cmdline_flow.c).
- Removed extra period from testpmd documentation example (testpmd_funcs.rst).
- Extra commit to handle additional protocol item fields (for VLAN, IPv4, IPv6 and SCTP) requested by several people (cmdline_flow.c).
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | ethdev: introduce generic flow APIMAINTAINERS doc/ lib/ +5 more | +1309 | 0 replies | |
| 2/26 | doc: add rte_flow prog guidedoc/ doc/ | +2042 | 1 reply | |
| 3/26 | doc: announce deprecation of legacy filter typesdoc/ | +8 | 0 replies | |
| 4/26 | cmdline: add support for dynamic tokenslib/ lib/ | +74 | 0 replies | |
| 5/26 | cmdline: add alignment constraintlib/ | +6 | 0 replies | |
| 6/26 | app/testpmd: implement basic support for rte_flowapp/ app/ app/ +11 more | +542 | 0 replies | |
| 7/26 | app/testpmd: add flow commandapp/ app/ app/ | +444 | 0 replies | |
| 8/26 | app/testpmd: add rte_flow integer supportapp/ | +148 | 0 replies | |
| 9/26 | app/testpmd: add flow list commandapp/ app/ | +145 | 0 replies | |
| 10/26 | app/testpmd: add flow flush commandapp/ app/ | +45 | 0 replies | |
| 11/26 | app/testpmd: add flow destroy commandapp/ app/ | +108 | 0 replies | |
| 12/26 | app/testpmd: add flow validate/create commandsapp/ app/ | +327 | 0 replies | |
| 13/26 | app/testpmd: add flow query commandapp/ app/ | +123 | 0 replies | |
| 14/26 | app/testpmd: add rte_flow item spec handlerapp/ | +111 | 0 replies | |
| 15/26 | app/testpmd: add rte_flow item spec prefix lengthapp/ | +80 | 0 replies | |
| 16/26 | app/testpmd: add rte_flow bit-field supportapp/ | +70 | 0 replies | |
| 17/26 | app/testpmd: add item any to flow commandapp/ | +22 | 0 replies | |
| 18/26 | app/testpmd: add various items to flow commandapp/ | +53 | 0 replies | |
| 19/26 | app/testpmd: add item raw to flow commandapp/ | +208 | 3 replies | |
| 20/26 | app/testpmd: add items eth/vlan to flow commandapp/ | +126 | 0 replies | |
| 21/26 | app/testpmd: add items ipv4/ipv6 to flow commandapp/ | +177 | 0 replies | |
| 22/26 | app/testpmd: add L4 items to flow commandapp/ | +163 | 0 replies | |
| 23/26 | app/testpmd: add various actions to flow commandapp/ | +121 | 0 replies | |
| 24/26 | app/testpmd: add queue actions to flow commandapp/ | +152 | 0 replies | |
| 25/26 | doc: describe testpmd flow commanddoc/ | +612 | 0 replies | |
| 26/26 | app/testpmd: add protocol fields to flow commandapp/ doc/ | +139 | 0 replies |
Reviews trailers per patch
25 of 26 patches have a Reviewed-by or Acked-by.
| Patch | Olga Shern | John McNamara |
|---|---|---|
| 1/26 | A-b | |
| 2/26 | A-b | A-b |
| 3/26 | A-b | |
| 4/26 | A-b | |
| 5/26 | A-b | |
| 6/26 | A-b | |
| 7/26 | A-b | |
| 8/26 | A-b | |
| 9/26 | A-b | |
| 10/26 | A-b | |
| 11/26 | A-b | |
| 12/26 | A-b | |
| 13/26 | A-b | |
| 14/26 | A-b | |
| 15/26 | A-b | |
| 16/26 | A-b | |
| 17/26 | A-b | |
| 18/26 | A-b | |
| 19/26 | A-b | |
| 20/26 | A-b | |
| 21/26 | A-b | |
| 22/26 | A-b | |
| 23/26 | A-b | |
| 24/26 | A-b | |
| 25/26 | A-b | A-b |
| 26/26 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 00/26] Generic flow API (rte_flow)
As previously discussed in RFC v1 [1], RFC v2 [2], with changes described in [3] (also pasted below), here is the first non-draft series for this new API.
Its capabilities are so generic that its name had to be vague, it may be called "Generic flow API", "Generic flow interface" (possibly shortened as "GFI") to refer to the name of the new filter type, or "rte_flow" from the prefix used for its public symbols. I personally favor the latter.
While it is currently meant to supersede existing filter types in order for all PMDs to expose a common filtering/classification interface, it may eventually evolve to cover the following ideas as well:
- Rx/Tx offloads configuration through automatic offloads for specific packets, e.g. performing checksum on TCP packets could be expressed with an egress rule with a TCP pattern and a kind of checksum action.
- RSS configuration (already defined actually). Could be global or per rule depending on hardware capabilities.
- Switching configuration for devices with many physical ports; rules doing both ingress and egress could even be used to completely bypass software if supported by hardware.
[1] http://dpdk.org/ml/archives/dev/2016-July/043365.html
[2] http://dpdk.org/ml/archives/dev/2016-August/045383.html
[3] http://dpdk.org/ml/archives/dev/2016-November/050044.html
Changes since v4 series:
- Fixed compilation regression introduced in v2, caused by new #include directive (rte_flow_driver.h).
- Fixed remaining documentation tables that broke PDF generation (John Mcnamara / rte_flow.rst).
- Fixed testpmd flow command's bit-field handler that filled values in the wrong order on big-endian systems. This change also makes arg_entry_bf_fill() support endian conversion at no additional cost (cmdline_flow.c).
- Removed extra period from testpmd documentation example (testpmd_funcs.rst).
- Extra commit to handle additional protocol item fields (for VLAN, IPv4, IPv6 and SCTP) requested by several people (cmdline_flow.c).
Changes since v3 series:
- Fixed documentation tables that broke PDF generation (John Mcnamara / rte_flow.rst).
- Also properly aligned "Action" lines in several tables with their corresponding "Index" (rte_flow.rst).
- Fixed remaining ICC error #188 in testpmd (Ferruh / cmdline_flow.c).
- Indented testpmd examples properly (John / testpmd_funcs.rst).
- Fixed wrong port in example (Ferruh / testpmd_funcs.rst).
Changes since v2 series:
- Replaced ENOTSUP with ENOSYS in the code (although doing so triggers spurious checkpatch warnings) to tell apart unimplemented callbacks from unsupported flow rules and match the documented behavior.
- Fixed missing include seen by check-includes.sh in rte_flow_driver.h.
- Made clearer that PMDs must initialize rte_flow_error (if non-NULL) in case of error, added related memory poisoning in testpmd to catch missing initializations.
- Fixed rte_flow programmer's guide according to John Mcnamara's comments (tables, sections header and typos).
- Fixed deprecation notice as well.
Changes since v1 series:
- Added programmer's guide documentation for rte_flow.
- Added depreciation notice for the legacy API.
- Documented testpmd flow command.
- Fixed missing rte_flow_flush symbol in rte_ether_version.map.
- Cleaned up API documentation in rte_flow.h.
- Replaced "min/max" parameters with "num" in struct rte_flow_item_any, to align behavior with other item definitions.
- Fixed "type" (EtherType) size in struct rte_flow_item_eth.
- Renamed "queues" to "num" in struct rte_flow_action_rss.
- Fixed missing const in rte_flow_error_set() prototype definition.
- Fixed testpmd flow create command that did not save the rte_flow object pointer, causing crashes.
- Hopefully fixed all the remaining ICC/clang errors.
- Replaced testpmd flow command's "fix" token with "is" for clarity.
Changes since RFC v2:
- New separate VLAN pattern item (previously part of the ETH definition), found to be much more convenient.
- Removed useless "any" field from VF pattern item, the same effect can be achieved by not providing a specification structure.
- Replaced bit-fields from the VXLAN pattern item to avoid endianness conversion issues on 24-bit fields.
- Updated struct rte_flow_item with a new "last" field to create inclusive ranges. They are defined as the interval between (spec & mask) and (last & mask). All three parameters are optional.
- Renamed ID action MARK.
- Renamed "queue" fields in actions QUEUE and DUP to "index".
- "rss_conf" field in RSS action is now const.
- VF action now uses a 32 bit ID like its pattern item counterpart.
- Removed redundant struct rte_flow_pattern, API functions now expect struct
rte_flow_item lists terminated by END items.
- Replaced struct rte_flow_actions for the same reason, with struct rte_flow_action lists terminated by END actions.
- Error types (enum rte_flow_error_type) have been updated and the cause pointer in struct rte_flow_error is now const.
- Function prototypes (rte_flow_create, rte_flow_validate) have also been updated for clarity.
Additions:
- Public wrapper functions rte_flow_{validate|create|destroy|flush|query} are now implemented in rte_flow.c, with their symbols exported and versioned. Related filter type RTE_ETH_FILTER_GENERIC has been added.
- A separate header (rte_flow_driver.h) has been added for driver-side functionality, in particular struct rte_flow_ops which contains PMD callbacks returned by RTE_ETH_FILTER_GENERIC query.
- testpmd now exposes most of this API through the new "flow" command.
What remains to be done:
- Using endian-aware integer types (rte_beX_t) where necessary for clarity.
- API documentation (based on RFC).
- testpmd flow command documentation (although context-aware command completion should already help quite a bit in this regard).
- A few pattern item / action properties cannot be configured yet (e.g. rss_conf parameter for RSS action) and a few completions (e.g. possible queue IDs) should be added.
Adrien Mazarguil (26):
ethdev: introduce generic flow API
doc: add rte_flow prog guide
doc: announce deprecation of legacy filter types
cmdline: add support for dynamic tokens
cmdline: add alignment constraint app/testpmd: implement basic support for rte_flow app/testpmd: add flow command app/testpmd: add rte_flow integer support app/testpmd: add flow list command app/testpmd: add flow flush command app/testpmd: add flow destroy command app/testpmd: add flow validate/create commands app/testpmd: add flow query command app/testpmd: add rte_flow item spec handler app/testpmd: add rte_flow item spec prefix length app/testpmd: add rte_flow bit-field support app/testpmd: add item any to flow command app/testpmd: add various items to flow command app/testpmd: add item raw to flow command app/testpmd: add items eth/vlan to flow command app/testpmd: add items ipv4/ipv6 to flow command app/testpmd: add L4 items to flow command app/testpmd: add various actions to flow command app/testpmd: add queue actions to flow command
doc: describe testpmd flow command app/testpmd: add protocol fields to flow command
MAINTAINERS | 4 + app/test-pmd/Makefile | 1 + app/test-pmd/cmdline.c | 32 + app/test-pmd/cmdline_flow.c | 2713 ++++++++++++++++++++++ app/test-pmd/config.c | 498 ++++ app/test-pmd/csumonly.c | 1 + app/test-pmd/flowgen.c | 1 + app/test-pmd/icmpecho.c | 1 + app/test-pmd/ieee1588fwd.c | 1 + app/test-pmd/iofwd.c | 1 + app/test-pmd/macfwd.c | 1 + app/test-pmd/macswap.c | 1 + app/test-pmd/parameters.c | 1 + app/test-pmd/rxonly.c | 1 + app/test-pmd/testpmd.c | 6 + app/test-pmd/testpmd.h | 27 + app/test-pmd/txonly.c | 1 + doc/api/doxy-api-index.md | 2 + doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/rte_flow.rst | 2041 ++++++++++++++++ doc/guides/rel_notes/deprecation.rst | 8 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 624 +++++ lib/librte_cmdline/cmdline_parse.c | 67 +- lib/librte_cmdline/cmdline_parse.h | 21 + lib/librte_ether/Makefile | 3 + lib/librte_ether/rte_eth_ctrl.h | 1 + lib/librte_ether/rte_ether_version.map | 11 + lib/librte_ether/rte_flow.c | 159 ++ lib/librte_ether/rte_flow.h | 947 ++++++++ lib/librte_ether/rte_flow_driver.h | 182 ++ 30 files changed, 7349 insertions(+), 9 deletions(-) create mode 100644 app/test-pmd/cmdline_flow.c create mode 100644 doc/guides/prog_guide/rte_flow.rst create mode 100644 lib/librte_ether/rte_flow.c create mode 100644 lib/librte_ether/rte_flow.h create mode 100644 lib/librte_ether/rte_flow_driver.h
Signature · 1 line
2.1.4