On Wed, Jul 09, 2025 at 07:47:43PM +0200, Eugenio Pérez wrote: > As it is the only function using it. I'm always confusing it with > tcp_l2_iov, moving it here avoids it. > > Signed-off-by: Eugenio Pérez I like making it local, I'd question whether it even needs to remain 'static'. > --- > tcp_buf.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tcp_buf.c b/tcp_buf.c > index c999d2e..6d79d67 100644 > --- a/tcp_buf.c > +++ b/tcp_buf.c > @@ -55,9 +55,6 @@ static_assert(MSS6 <= sizeof(tcp_payload[0].data), "MSS6 is greater than 65516") > static struct tcp_tap_conn *tcp_frame_conns[TCP_FRAMES_MEM]; > static unsigned int tcp_payload_used; > > -/* recvmsg()/sendmsg() data for tap */ > -static struct iovec iov_sock [TCP_FRAMES_MEM + 1]; > - > static struct iovec tcp_l2_iov[TCP_FRAMES_MEM][TCP_NUM_IOVS]; > > /** > @@ -292,6 +289,8 @@ static void tcp_data_to_tap(const struct ctx *c, struct tcp_tap_conn *conn, > */ > int tcp_buf_data_from_sock(const struct ctx *c, struct tcp_tap_conn *conn) > { > + static struct iovec iov_sock[TCP_FRAMES_MEM + 1]; > + > uint32_t wnd_scaled = conn->wnd_from_tap << conn->ws_from_tap; > int fill_bufs, send_bufs = 0, last_len, iov_rem = 0; > int len, dlen, i, s = conn->sock; -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson