1
0
mirror of https://passt.top/passt synced 2024-07-02 07:52:41 +00:00

tcp: Remove remaining declaration of tcp_l2_mh

Use of tcp_l2_mh has been removed in commit 38fbfdbcb9,
but its declaration and initialization are always in the code.
Remove them as they are useless.

Fixes: 38fbfdbcb9 ("tcp: Get rid of iov with cached MSS, drop sendmmsg(), add deferred flush")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Laurent Vivier 2023-10-13 10:45:45 +02:00 committed by Stefano Brivio
parent 515db1ecc4
commit 0ad54e1043

6
tcp.c
View File

@ -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);