mirror of
https://passt.top/passt
synced 2025-06-19 05:25:34 +02:00
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
d909fda1e8
commit
233b95e90f
4 changed files with 46 additions and 46 deletions
2
tcp.h
2
tcp.h
|
@ -32,7 +32,6 @@ void tcp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s,
|
|||
/**
|
||||
* union tcp_epoll_ref - epoll reference portion for TCP connections
|
||||
* @listen: Set if this file descriptor is a listening socket
|
||||
* @splice: Set if descriptor is associated to a spliced connection
|
||||
* @outbound: Listening socket maps to outbound, spliced connection
|
||||
* @v6: Set for IPv6 sockets or connections
|
||||
* @timer: Reference is a timerfd descriptor for connection
|
||||
|
@ -42,7 +41,6 @@ void tcp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s,
|
|||
union tcp_epoll_ref {
|
||||
struct {
|
||||
uint32_t listen:1,
|
||||
splice:1,
|
||||
outbound:1,
|
||||
v6:1,
|
||||
timer:1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue