From 7a97c5a3b5b5bb444f6867b9b14777db94f9a4fa Mon Sep 17 00:00:00 2001 From: Aleksey Mikhaylov Date: Mon, 21 Feb 2022 14:50:11 +0300 Subject: [PATCH] Replace GFSM calls with direct calls to TLS and HTTP Almost literaly follow ak patch from 2eae1dae4fc579043773ca61f709cf8ab910f10f Replace GFSM calls with direct calls to TLS and HTTP handlers on low level networking layers. GFSM was designed to build graphs of network protocols FSMs (this design was inspired by FreeBSD netgraph). However, during the years neither we nor external users have any requirements to introduce any modules which use GFSM to hook TLS or HTTP entry code. There are only 2 users of the mechanism for TLS and HTTP for now: 1. TLS -> HTTP protocols handling 2. HTTP limits (the frang module) This patch replaces GFSM calls with direct calls to tfw_http_req_process(), tfw_tls_msg_process() and frang_tls_handler() in following paths: 1. sync sockets -> TLS 2. sync sockets -> HTTP 3. TLS -> HTTP 4. TLS -> Frang As the result the function tfw_connection_recv() was eliminated. Now the code is simpler and has lower overhead. We still might need GFSM for the user-space requests handling (#77) and Tempesta Language (#102). Contributes to #755 Based-on-patch-by: Alexander K Signed-off-by: Aleksey Mikhaylov