-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
String: Support longer exact match strings
String matching is limited to strings of length 144 due to the way the hash look up tables were implemented (6 key sizes, 24 byte increments). This commit adds maps to support larger key/string sizes: 256, 512, 1024, 2048, and 4096. This will therefore permit exact string matches for strings of length up to 4096 (not including null terminator). Unfortunately, kernels v5.10 and lower restrict hash key lengths to 512 bytes, so on these kernels the maximum string length is 510 characters (512 - 2 bytes for embedded string length). And on older kernels (<5.3) the instruction and complexity limits mean the new approach is not feasible. Therefore on these kernels, the maximum string length is 144 characters (as before). Includes tests at map limits. Signed-off-by: Kevin Sheldrake <[email protected]>
- Loading branch information
1 parent
08458a2
commit 834b5fe
Showing
14 changed files
with
615 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.