We no longer check the 'splice' flag in the UDP epoll reference. Instead, we determine whether a datagram needs to be spliced from the pifs in the flow table. So, eliminate this field. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- udp.c | 5 ++--- udp.h | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/udp.c b/udp.c index c170b0be..1789a572 100644 --- a/udp.c +++ b/udp.c @@ -350,7 +350,7 @@ int udp_splice_new(const struct ctx *c, int v6, in_port_t src, bool ns) { struct epoll_event ev = { .events = EPOLLIN | EPOLLRDHUP | EPOLLHUP }; union epoll_ref ref = { .type = EPOLL_TYPE_UDP, - .udp = { .splice = true, .v6 = v6, .port = src } + .udp = { .v6 = v6, .port = src } }; struct udp_bound_port *sp; int act, s; @@ -989,8 +989,7 @@ int udp_tap_handler(const struct ctx *c, uint8_t pif, int udp_sock_init(const struct ctx *c, int ns, sa_family_t af, const void *addr, const char *ifname, in_port_t port) { - union udp_epoll_ref uref = { .splice = (c->mode == MODE_PASTA), - .orig = true, .port = port }; + union udp_epoll_ref uref = { .orig = true, .port = port }; int s, r4 = FD_REF_MAX + 1, r6 = FD_REF_MAX + 1; if (ns) diff --git a/udp.h b/udp.h index 4ae65723..4b62b996 100644 --- a/udp.h +++ b/udp.h @@ -25,7 +25,6 @@ void udp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s); * @port: Source port for connected sockets, bound port otherwise * @pif: pif for this socket * @bound: Set if this file descriptor is a bound socket - * @splice: Set if descriptor packets to be "spliced" * @orig: Set if a spliced socket which can originate "connections" * @v6: Set for IPv6 sockets or connections * @u32: Opaque u32 value of reference @@ -34,8 +33,7 @@ union udp_epoll_ref { struct { in_port_t port; uint8_t pif; - bool splice:1, - orig:1, + bool orig:1, v6:1; }; uint32_t u32; -- 2.45.2