diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-07 13:42:42 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:53:58 +0100 |
commit | 5a79ba6272814dda72b387ea13b97d1f0e79dbcf (patch) | |
tree | 86cc44a8a003e508ad98992ec285faedcefe3670 /test/perf/pasta_tcp | |
parent | 536acab2de70468b3d8e6b5f876576525ce82258 (diff) | |
download | passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar.gz passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar.bz2 passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar.lz passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar.xz passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.tar.zst passt-5a79ba6272814dda72b387ea13b97d1f0e79dbcf.zip |
tcp_splice: Don't handle EPOLL_CTL_DEL as part of tcp_splice_epoll_ctl()
tcp_splice_epoll_ctl() removes both sockets from the epoll set if called
when conn->flags & CLOSING. This will always happen immediately after
setting that flag, since conn_flag_do() makes the call itself. That's also
the _only_ time it can happen: we perform the EPOLL_CTL_DEL without
clearing the conn->in_epoll flag, meaning that any further calls to
tcp_splice_epoll_ctl() would attempt EPOLL_CTL_MOD, which would necessarily
fail since the fds are no longer in the epoll.
The EPOLL_CTL_DEL path in tcp_splice_epoll_ctl() has essentially zero
overlap with anything else the function does, so just move them to be
open coded in conn_flag_do().
This does require kernel 2.6.9 or later, in order to pass NULL as the
event structure for epoll_ctl(). However, we already require at least
3.13 to allow unprivileged user namespaces.
Given that, simply directly perform the EPOLL_CTL_DEL operations from
conn_flag_do() rather than unnecessarily multiplexini
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/perf/pasta_tcp')
0 files changed, 0 insertions, 0 deletions