Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation multi pattern regular expressions #2161

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
21e7fff
feat(1808): migrate to Linux 6.8.9
kingluo May 9, 2024
8e0e942
apply stats fix in advanced
kingluo May 11, 2024
dc6d26d
remove duplicated sk->sk_cgrp_data.cgroup init
kingluo May 11, 2024
bca16f5
disable AVX2 temporarily before fpu works
kingluo May 11, 2024
1040a54
bignum_x86-64.S: replace ret with RET, to use __x86_return_thunk
kingluo May 14, 2024
95d8481
re-enable AVX2, replace ret with RET
kingluo May 17, 2024
86e3043
disable AVX2 for memcpy/memcmp/bzero temporarily to avoid userspace s…
kingluo May 23, 2024
e6256ea
disable skb->head_frag assertion temporarily to avoid panic
kingluo May 23, 2024
7c10e6a
fix TfwGState->curr type: ensure correct frang index
kingluo May 25, 2024
3d5730e
filter out SO_EE_ORIGIN_TIMESTAMPING in sk->sk_error_queue
kingluo May 27, 2024
89d2f30
enable fpu in the whole softirq ctx
kingluo Jun 4, 2024
2e4a18d
continue sk->sk_receive_queue processing in case of SO_EE_ORIGIN_TIME…
kingluo Jun 4, 2024
f8b1e53
fix assembly functions: RET and endbr64-jump-table
kingluo Jun 6, 2024
356c594
Merge remote-tracking branch 'origin/master' into jinhua/feat-1808-mi…
kingluo Jun 17, 2024
8afb1d6
clean up temporary changes
kingluo Jun 17, 2024
e95951a
add linux-6.8.9.patch
kingluo Jun 17, 2024
99bb027
patch update: change for_each_possible_cpu to for_each_online_cpu
kingluo Jun 26, 2024
c1c068b
handle SKBFL_SHARED_FRAG in flags, not tx_flags
kingluo Jul 4, 2024
96628ac
merge master branch: 0dee0257
kingluo Jul 4, 2024
f8de856
update linux-6.8.9.patch
kingluo Jul 4, 2024
094940e
Revert "enable fpu in the whole softirq ctx"
kingluo Jul 8, 2024
eb1e9ec
try endbr64 on each switch label
kingluo Jul 8, 2024
2406021
remove notrack, prefix endbr64 at each jump table entry
kingluo Jul 8, 2024
b73a31a
use struct_group to avoid __write_overflow_field
kingluo Jul 9, 2024
09bd329
Remove `kernel_fpu_begin()` added by mistake
kingluo Jul 14, 2024
09f70b3
Implemented regex for locations and httptables
Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tempesta FW
#
# Copyright (C) 2014 NatSys Lab. (info@natsys-lab.com).
# Copyright (C) 2015-2022 Tempesta Technologies, Inc.
# Copyright (C) 2015-2024 Tempesta Technologies, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand All @@ -24,7 +24,7 @@ else
test-gt = $(shell test $(strip $1)0 -gt $(strip $2)0 && echo y)
endif

TFW_CFLAGS = $(DEFINES) -Werror
TFW_CFLAGS = $(DEFINES) -Werror -Wno-missing-prototypes -Wno-error=missing-declarations -Wno-missing-declarations
ifdef DEBUG
ifeq ($(call test-gt, 1, $(DEBUG)), y)
ERROR = "DEBUG must be greater than 0"
Expand Down Expand Up @@ -73,6 +73,7 @@ DBG_WS ?= 0
DBG_APM ?= 0
DBG_GFSM ?= 0
DBG_HTTP ?= 0
DBG_HTTP2 ?= 0
DBG_HTTP_FRAME ?= 0
DBG_HTTP_SESS ?= 0
DBG_HTTP_STREAM ?= 0
Expand All @@ -89,6 +90,7 @@ TFW_CFLAGS += -DDBG_HTTP_SESS=$(DBG_HTTP_SESS)
TFW_CFLAGS += -DDBG_HTTP_STREAM=$(DBG_HTTP_STREAM)
TFW_CFLAGS += -DDBG_HPACK=$(DBG_HPACK) -DDBG_CACHE=$(DBG_CACHE)
TFW_CFLAGS += -DDBG_SRV=$(DBG_SRV) -DDBG_VHOST=$(DBG_VHOST) -DDBG_TEST=$(DBG_TEST)
TFW_CFLAGS += -DDBG_HTTP2=$(DBG_HTTP2)

# By default Tempesta TLS randomizes elliptic curve points using RDRAND
# instruction, which provides a high speed random numbers generator.
Expand Down Expand Up @@ -144,7 +146,7 @@ KERNEL = /lib/modules/$(shell uname -r)/build

export KERNEL TFW_CFLAGS AVX2 BMI2 ADX TFW_GCOV

obj-m += lib/ db/core/ fw/ tls/
obj-m += lib/ db/core/ regex/ fw/ tls/

all: build

Expand Down
4 changes: 2 additions & 2 deletions db/core/htrie.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* and shutdown are performed in process context.
*
* Copyright (C) 2014 NatSys Lab. (info@natsys-lab.com).
* Copyright (C) 2015-2021 Tempesta Technologies, Inc.
* Copyright (C) 2015-2024 Tempesta Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -918,7 +918,7 @@ tdb_htrie_init(void *p, size_t db_size, unsigned int rec_len)
TDB_ERR("cannot allocate per-cpu data\n");
return NULL;
}
for_each_possible_cpu(cpu) {
for_each_online_cpu(cpu) {
TdbPerCpu *p = per_cpu_ptr(hdr->pcpu, cpu);
p->i_wcl = tdb_alloc_blk(hdr);
p->d_wcl = tdb_alloc_blk(hdr);
Expand Down
18 changes: 8 additions & 10 deletions fw/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ typedef struct {

typedef struct {
TfwPcntCtl ctl[TFW_STATS_RANGES];
char __reset_from[0];
unsigned long tot_cnt;
unsigned long tot_val;
unsigned int min_val;
unsigned int max_val;
unsigned long cnt[TFW_STATS_RANGES][TFW_STATS_BCKTS];
char __reset_till[0];
struct_group(reset,
unsigned long tot_cnt;
unsigned long tot_val;
unsigned int min_val;
unsigned int max_val;
unsigned long cnt[TFW_STATS_RANGES][TFW_STATS_BCKTS];
);
} TfwPcntRanges __attribute__((aligned(L1_CACHE_BYTES)));

static inline unsigned long *
Expand Down Expand Up @@ -840,9 +840,7 @@ tfw_apm_prnctl_calc(TfwApmRBuf *rbuf, TfwApmRBCtl *rbctl, TfwPrcntlStats *pstats
static inline void
__tfw_apm_rbent_reset(TfwApmRBEnt *crbent, unsigned long jtmistamp)
{
memset(crbent->pcntrng.__reset_from, 0,
offsetof(TfwPcntRanges, __reset_till)
- offsetof(TfwPcntRanges, __reset_from));
memset(&crbent->pcntrng.reset, 0, sizeof(crbent->pcntrng.reset));
crbent->pcntrng.min_val = UINT_MAX;
crbent->jtmistamp = jtmistamp;
smp_mb__before_atomic();
Expand Down
Loading