RFC regex/hs: introduce Hyperscan regex PMD
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 RFC Latest7 patches 0 repliesNew
- v2 RFC7 patches 0 repliesSuperseded
- v1 RFC7 patches 1 replySuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | regex/hs: add driver skeleton and build integration.mailmap MAINTAINERS doc/ +7 more | +498 | 0 replies | |
| 2/7 | regex/hs: add device configure and queue pair setupdrivers/ | +182 | 0 replies | |
| 3/7 | regex/hs: add rule database update and compilationdoc/ drivers/ drivers/ | +508 | 0 replies | |
| 4/7 | regex/hs: add enqueue and dequeue burst pathsdrivers/ | +236 | 0 replies | |
| 5/7 | regex/hs: add per-queue-pair extended statisticsdoc/ drivers/ | +168 | 0 replies | |
| 6/7 | regex/hs: add start stop close and device dumpdoc/ drivers/ drivers/ | +200 | 0 replies | |
| 7/7 | regex/hs: add Hyperscan compile flag supportdoc/ drivers/ drivers/ | +74 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [RFC v3 0/7] regex/hs: introduce Hyperscan regex PMD
This RFC series adds a new regexdev PMD based on Hyperscan.
Goal: provide a software regex PMD for environments without regex HW, while keeping compatibility with the standard ``rte_regexdev`` API. The PMD is a virtual device, created with ``--vdev=regex_hs`` at EAL init.
The series introduces:
- a new vdev driver under ``drivers/regex/hs``
- device and queue pair configuration, start/stop/close lifecycle, and device dump support
- rule database update, compile+activate, import/export of serialized Hyperscan databases
- enqueue/dequeue burst paths with per-queue-pair scratch usage and per-queue-pair extended statistics (enqueued/dequeued/matches)
- PMD-private rule flag mappings for common Hyperscan compile options (singlematch, prefilter, SOM-leftmost, combination, quiet)
Behavior notes relevant for review:
- per-op match counters are bounded by API field width (``nb_matches``/``nb_actual_matches`` are ``uint16_t``)
- payload size exposed through regexdev is ``max_payload_size = 65535`` bytes, while Hyperscan block mode itself supports larger scan buffers
- queue pairs are intended for single-thread ownership (SPSC model) with dedicated scratch per queue pair
Documentation, feature matrix integration, meson integration, and maintainers metadata are included.
Prudvi Deti (7):
regex/hs: add driver skeleton and build integration regex/hs: add device configure and queue pair setup regex/hs: add rule database update and compilation regex/hs: add enqueue and dequeue burst paths regex/hs: add per-queue-pair extended statistics regex/hs: add start stop close and device dump regex/hs: add Hyperscan compile flag support
---
v3: Addressed AI review of the driver skeleton patch:
* Fixed a resource ordering issue in hs_regex_dev_create(): the device private data is now allocated before rte_regexdev_register(), so a registration failure cannot leave a registered device with no cleanup path, and a private-data allocation failure no longer needs to unregister the device.
v2: Addressed AI reviews with the following changes:
* Fixed a queue-pair resource leak on reconfigure (stale scratch and operation ring were not freed before reallocation).
* Rejected unsupported device and queue-pair configuration flags instead of silently ignoring them.
* Fixed a rule-id hash name collision between multiple device instances by including the device id in the hash name.
* Validated rule operations and fixed rule-id hash/array consistency on add and remove failures.
* Cleared the compiled-database state on a failed rule database import so a partially failed import cannot be reported as started.
* Implemented stop-on-match request handling and saturated the per-op actual-match count instead of wrapping past 65535.
* Fixed device info to report the backing vdev device instead of NULL.
* Moved the pending-operation warning so it fires on both explicit and implicit stop.
* Documented the 20-bit match-result rule-id limit and the unsupported high-priority match request mode.
* Capped dev_dump() rule listing with a summary line for large rule counts instead of printing every rule unconditionally.
* Documented that rule_db_export()'s output buffer has no alignment requirement.
* Documented building Hyperscan 5.4.2 from source as a prerequisite.
.mailmap | 1 + MAINTAINERS | 6 + doc/guides/regexdevs/features/hs.ini | 8 + doc/guides/regexdevs/hs.rst | 235 ++++ doc/guides/regexdevs/index.rst | 1 + doc/guides/rel_notes/release_26_11.rst | 19 + drivers/regex/hs/hs_regex.c | 1447 ++++++++++++++++++++++++ drivers/regex/hs/hs_regex.h | 101 ++ drivers/regex/hs/meson.build | 19 + drivers/regex/meson.build | 1 + 10 files changed, 1838 insertions(+) create mode 100644 doc/guides/regexdevs/features/hs.ini create mode 100644 doc/guides/regexdevs/hs.rst create mode 100644 drivers/regex/hs/hs_regex.c create mode 100644 drivers/regex/hs/hs_regex.h create mode 100644 drivers/regex/hs/meson.build
Signature · 1 line
2.43.0