diff options
author | Laurent Vivier <lvivier@redhat.com> | 2023-10-13 10:45:45 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:54:23 +0100 |
commit | 0ad54e104338e29dc271f198d4cca037405ac8d0 (patch) | |
tree | 60888f022f2a5744123bd9d1592f292fbbae1a05 /tcp.c | |
parent | 515db1ecc4afd8d2a75ffdea031dd71aa6821342 (diff) | |
download | passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar.gz passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar.bz2 passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar.lz passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar.xz passt-0ad54e104338e29dc271f198d4cca037405ac8d0.tar.zst passt-0ad54e104338e29dc271f198d4cca037405ac8d0.zip |
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 <lvivier@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
-rw-r--r-- | tcp.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -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); |