aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-16 08:17:18 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-16 08:17:18 +0200
commitd4815788820df171b6b5bfcaea4f9ff65a9a8b3d (patch)
tree2a822b1f80e81c9356f42941d23e8e468cc84417
parent45d9b0000e7690f03f4fdf56bebacc96392e0178 (diff)
downloadpasst-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar.gz
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar.bz2
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar.lz
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar.xz
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.tar.zst
passt-d4815788820df171b6b5bfcaea4f9ff65a9a8b3d.zip
pasta, tcp: Drop EPOLLET for spliced, established connections
...tcp_handler_splice() doesn't guarantee we read all the available data, the sending buffer might be full. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tcp.c b/tcp.c
index 231b842..cc36ac3 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1558,8 +1558,8 @@ static void tcp_table_splice_compact(struct ctx *c,
ev_from.events = EPOLLET | EPOLLRDHUP;
ev_to.events = EPOLLET | EPOLLOUT | EPOLLRDHUP;
} else {
- ev_from.events = EPOLLET | EPOLLIN | EPOLLOUT | EPOLLRDHUP;
- ev_to.events = EPOLLET | EPOLLIN | EPOLLOUT | EPOLLRDHUP;
+ ev_from.events = EPOLLIN | EPOLLOUT | EPOLLRDHUP;
+ ev_to.events = EPOLLIN | EPOLLOUT | EPOLLRDHUP;
}
ev_from.data.u64 = ref_from.u64;
@@ -2336,7 +2336,7 @@ static void tcp_splice_connect_finish(struct ctx *c,
if (conn->state == SPLICE_CONNECT) {
tcp_splice_state(conn, SPLICE_ESTABLISHED);
- ev_from.events = ev_to.events = EPOLLIN | EPOLLET | EPOLLRDHUP;
+ ev_from.events = ev_to.events = EPOLLIN | EPOLLRDHUP;
ev_from.data.u64 = ref_from.u64;
ev_to.data.u64 = ref_to.u64;
@@ -2615,7 +2615,7 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
if (events & EPOLLOUT) {
struct epoll_event ev = {
- .events = EPOLLIN | EPOLLET | EPOLLRDHUP,
+ .events = EPOLLIN | EPOLLRDHUP,
.data.u64 = ref.u64,
};
@@ -2714,7 +2714,7 @@ eintr:
if (retry_write--)
goto retry;
- ev.events = EPOLLIN | EPOLLOUT | EPOLLET | EPOLLRDHUP;
+ ev.events = EPOLLIN | EPOLLOUT | EPOLLRDHUP;
ref.s = move_to;
ev.data.u64 = ref.u64,
epoll_ctl(c->epollfd, EPOLL_CTL_MOD, move_to, &ev);