aboutgitcodebugslistschat
path: root/tcp_splice.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-02-28 22:25:16 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-02-29 09:48:15 +0100
commitdc9a5d71e9d0abbcfb115ca20461a94a981a9344 (patch)
tree659c2fc996b05185702f1cfa5dc9b82e6d802bfd /tcp_splice.h
parentee677e0a42c434787bf02cb715d76612a6550c21 (diff)
downloadpasst-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar.gz
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar.bz2
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar.lz
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar.xz
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.tar.zst
passt-dc9a5d71e9d0abbcfb115ca20461a94a981a9344.zip
tcp, tcp_splice: Parse listening socket epoll ref in tcp_listen_handler()
tcp_listen_handler() uses the epoll reference for the listening socket it handles, and also passes on one variant of it to tcp_tap_conn_from_sock() and tcp_splice_conn_from_sock(). The latter two functions only need a couple of specific fields from the reference. Pass those specific values instead of the whole reference, which localises the handling of the listening (as opposed to accepted) socket and its reference entirely within tcp_listen_handler(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.h')
-rw-r--r--tcp_splice.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcp_splice.h b/tcp_splice.h
index d0c6ff7..ed8f0c5 100644
--- a/tcp_splice.h
+++ b/tcp_splice.h
@@ -12,8 +12,9 @@ union sockaddr_inany;
void tcp_splice_sock_handler(struct ctx *c, union epoll_ref ref,
uint32_t events);
bool tcp_splice_conn_from_sock(const struct ctx *c,
- union tcp_listen_epoll_ref ref, union flow *flow,
- int s0, const union sockaddr_inany *sa);
+ uint8_t pif0, in_port_t dstport,
+ union flow *flow, int s0,
+ const union sockaddr_inany *sa);
void tcp_splice_init(struct ctx *c);
#endif /* TCP_SPLICE_H */