From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top, sbrivio@redhat.com
Subject: Re: [PATCH] tcp: Remove remaining declaration of tcp_l2_mh
Date: Sat, 14 Oct 2023 11:44:17 +1100 [thread overview]
Message-ID: <ZSnkYdKdnDHuEXjs@zatzit> (raw)
In-Reply-To: <20231013084545.1968825-1-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]
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 <lvivier@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-10-14 0:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 8:45 [PATCH] tcp: Remove remaining declaration of tcp_l2_mh Laurent Vivier
2023-10-14 0:44 ` David Gibson [this message]
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=ZSnkYdKdnDHuEXjs@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=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).