contrib: add Hyperscan regex engine (#21973)

Commit Message: contrib: add Hyperscan regex engine
Additional Description: Hyperscan has been introduced as an input matcher earlier this year. Since the regex engine interface has been completed, the patch extent the usage of Hyperscan into a contrib regex engine.
Risk Level: Low
Testing: Unit
Docs Changes: API
Release Notes: N/A
Platform Specific Features: Requires processor with SSSE3 support (nearly any modern x86 processor)

Signed-off-by: Xie Zhihao <zhihao.xie@intel.com>

Mirrored from https://github.com/envoyproxy/envoy @ 725d0b4b3e6fb84aa7dfd1ca4d5792f2dc4558b2
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent 1716248172
commit 529db0380d
  1. 1
      BUILD
  2. 11
      contrib/envoy/extensions/matching/input_matchers/hyperscan/v3alpha/hyperscan.proto
  3. 9
      contrib/envoy/extensions/regex_engines/hyperscan/v3alpha/BUILD
  4. 25
      contrib/envoy/extensions/regex_engines/hyperscan/v3alpha/hyperscan.proto
  5. 1
      versioning/BUILD

@ -89,6 +89,7 @@ proto_library(
"//contrib/envoy/extensions/network/connection_balance/dlb/v3alpha:pkg", "//contrib/envoy/extensions/network/connection_balance/dlb/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg",
"//contrib/envoy/extensions/regex_engines/hyperscan/v3alpha:pkg",
"//contrib/envoy/extensions/vcl/v3alpha:pkg", "//contrib/envoy/extensions/vcl/v3alpha:pkg",
"//envoy/admin/v3:pkg", "//envoy/admin/v3:pkg",
"//envoy/config/accesslog/v3:pkg", "//envoy/config/accesslog/v3:pkg",

@ -14,14 +14,9 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Hyperscan matcher] // [#protodoc-title: Hyperscan matcher]
// [#extension: envoy.matching.input_matchers.hyperscan] // [#extension: envoy.matching.input_matchers.hyperscan]
// `Hyperscan <https://github.com/intel/hyperscan>`_ regex matcher. The engine of the matcher uses // `Hyperscan <https://github.com/intel/hyperscan>`_ regex matcher. The matcher uses the Hyperscan
// hybrid automata techniques to allow simultaneous matching of large numbers of regular // engine which exploits x86 SIMD instructions to accelerate matching large numbers of regular
// expressions across streams of data. // expressions simultaneously across streams of data.
//
// The matcher follows PCRE pattern syntax, and the regex string must adhere to the documented
// `pattern support <https://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support>`_.
// The syntax is not compatible with the default RE2 regex matcher. Depending on configured expressions,
// swapping regex matcher may cause match rules to no longer be valid.
message Hyperscan { message Hyperscan {
// [#next-free-field: 11] // [#next-free-field: 11]
message Regex { message Regex {

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,25 @@
syntax = "proto3";
package envoy.extensions.regex_engines.hyperscan.v3alpha;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.regex_engines.hyperscan.v3alpha";
option java_outer_classname = "HyperscanProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/regex_engines/hyperscan/v3alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Hyperscan]
// [#extension: envoy.regex_engines.hyperscan]
// `Hyperscan <https://github.com/intel/hyperscan>`_ regex engine. The engine uses hybrid automata
// techniques to allow simultaneous matching of large numbers of regular expressions across streams
// of data.
//
// The engine follows PCRE pattern syntax, and the regex string must adhere to the documented
// `pattern support <https://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support>`_.
// The syntax is not compatible with the default RE2 regex engine. Depending on configured
// expressions, swapping regex engine may cause match rules to no longer be valid.
message Hyperscan {
}

@ -26,6 +26,7 @@ proto_library(
"//contrib/envoy/extensions/network/connection_balance/dlb/v3alpha:pkg", "//contrib/envoy/extensions/network/connection_balance/dlb/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha:pkg",
"//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg", "//contrib/envoy/extensions/private_key_providers/qat/v3alpha:pkg",
"//contrib/envoy/extensions/regex_engines/hyperscan/v3alpha:pkg",
"//contrib/envoy/extensions/vcl/v3alpha:pkg", "//contrib/envoy/extensions/vcl/v3alpha:pkg",
"//envoy/admin/v3:pkg", "//envoy/admin/v3:pkg",
"//envoy/config/accesslog/v3:pkg", "//envoy/config/accesslog/v3:pkg",

Loading…
Cancel
Save