From 0ad54e104338e29dc271f198d4cca037405ac8d0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 13 Oct 2023 10:45:45 +0200 Subject: tcp: Remove remaining declaration of tcp_l2_mh Use of tcp_l2_mh has been removed in commit 38fbfdbcb95d, but its declaration and initialization are always in the code. Remove them as they are useless. Fixes: 38fbfdbcb95d ("tcp: Get rid of iov with cached MSS, drop sendmmsg(), add deferred flush") Signed-off-by: Laurent Vivier Acked-by: David Gibson Signed-off-by: Stefano Brivio --- tcp.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index 2a14209..a1ff66d 100644 --- a/tcp.c +++ b/tcp.c @@ -514,8 +514,6 @@ static struct iovec tcp6_l2_iov [TCP_FRAMES_MEM]; static struct iovec tcp4_l2_flags_iov [TCP_FRAMES_MEM]; static struct iovec tcp6_l2_flags_iov [TCP_FRAMES_MEM]; -static struct mmsghdr tcp_l2_mh [TCP_FRAMES_MEM]; - /* sendmsg() to socket */ static struct iovec tcp_iov [UIO_MAXIOV]; @@ -3147,7 +3145,6 @@ static void tcp_sock_refill_init(const struct ctx *c) */ int tcp_init(struct ctx *c) { - int i; #ifndef HAS_GETRANDOM int dev_random = open("/dev/random", O_RDONLY); unsigned int random_read = 0; @@ -3176,9 +3173,6 @@ int tcp_init(struct ctx *c) exit(EXIT_FAILURE); } - for (i = 0; i < ARRAY_SIZE(tcp_l2_mh); i++) - tcp_l2_mh[i] = (struct mmsghdr) { .msg_hdr.msg_iovlen = 1 }; - if (c->ifi4) tcp_sock4_iov_init(c); -- cgit v1.2.3