On Fri, Oct 13, 2023 at 10:45:45AM +0200, Laurent Vivier wrote: > 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") > Cc: sbrivio@redhat.com > Signed-off-by: Laurent Vivier Acked-by: David Gibson > --- > tcp.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/tcp.c b/tcp.c > index 945023c5b442..386cd015be1c 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -515,8 +515,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]; > > @@ -3143,7 +3141,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; > @@ -3172,9 +3169,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); > -- David Gibson | 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