From 233b95e90f8e9391d93d2187f682eaf51b6f3dd1 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 17 Nov 2022 16:58:53 +1100 Subject: tcp: Remove splice from tcp_epoll_ref Currently the epoll reference for tcp sockets includes a bit indicating whether the socket maps to a spliced connection. However, the reference also has the index of the connection structure which also indicates whether it is spliced. We can therefore avoid the splice bit in the epoll_ref by unifying the first part of the non-spliced and spliced handlers where we look up the connection state. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- tcp_splice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tcp_splice.h') diff --git a/tcp_splice.h b/tcp_splice.h index 1a915dd..6814ae7 100644 --- a/tcp_splice.h +++ b/tcp_splice.h @@ -8,8 +8,8 @@ struct tcp_splice_conn; -void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref, - uint32_t events); +void tcp_splice_sock_handler(struct ctx *c, struct tcp_splice_conn *conn, + int s, uint32_t events); bool tcp_splice_conn_from_sock(struct ctx *c, union epoll_ref ref, struct tcp_splice_conn *conn, int s, const struct sockaddr *sa); -- cgit v1.2.3