From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>, sbrivio@redhat.com
Subject: [PATCH] tcp: Remove remaining declaration of tcp_l2_mh
Date: Fri, 13 Oct 2023 10:45:45 +0200 [thread overview]
Message-ID: <20231013084545.1968825-1-lvivier@redhat.com> (raw)
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
next reply other threads:[~2023-10-13 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 8:45 Laurent Vivier [this message]
2023-10-14 0:44 ` [PATCH] tcp: Remove remaining declaration of tcp_l2_mh David Gibson
2023-11-07 12:45 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231013084545.1968825-1-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).