e5eefe7743
Using events and flags instead of states makes the implementation much more straightforward: actions are mostly centered on events that occurred on the connection rather than states. An example is given by the ESTABLISHED_SOCK_FIN_SENT and FIN_WAIT_1_SOCK_FIN abominations: we don't actually care about which side started closing the connection to handle closing of connection halves. Split out the spliced implementation, as it has very little in common with the "regular" TCP path. Refactor things here and there to improve clarity. Add helpers to trace where resets and flag settings come from. No functional changes intended. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
14 lines
461 B
C
14 lines
461 B
C
/* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
* Copyright (c) 2022 Red Hat GmbH
|
|
* Author: Stefano Brivio <sbrivio@redhat.com>
|
|
*/
|
|
|
|
#define TCP_SPLICE_MAX_CONNS (128 * 1024)
|
|
|
|
struct tcp_splice_conn;
|
|
|
|
void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
|
|
uint32_t events);
|
|
void tcp_splice_destroy(struct ctx *c, struct tcp_splice_conn *conn);
|
|
void tcp_splice_init(struct ctx *c);
|
|
void tcp_splice_timer(struct ctx *c, struct timespec *now);
|