public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] tcp: Remove remaining declaration of tcp_l2_mh
@ 2023-10-13  8:45 Laurent Vivier
  2023-10-14  0:44 ` David Gibson
  2023-11-07 12:45 ` Stefano Brivio
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2023-10-13  8:45 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier, sbrivio

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 <lvivier@redhat.com>
---
 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);
 
-- 
@@ -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);
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-07 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13  8:45 [PATCH] tcp: Remove remaining declaration of tcp_l2_mh Laurent Vivier
2023-10-14  0:44 ` David Gibson
2023-11-07 12:45 ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).