From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH trivial 3/3] tcp_vu: Remove redundant th->doff and th->ack in tcp_vu_send_flag()
Date: Tue, 24 Mar 2026 10:11:39 +1100 [thread overview]
Message-ID: <acHIq79YgQEQ75SP@zatzit> (raw)
In-Reply-To: <20260320135116.575416-4-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
On Fri, Mar 20, 2026 at 02:51:16PM +0100, Laurent Vivier wrote:
> tcp_prepare_flags() unconditionally sets th->doff and th->ack, so
> setting them right after the memset() is redundant.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> tcp_vu.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tcp_vu.c b/tcp_vu.c
> index 9c4e916b1b8d..7a348eb01248 100644
> --- a/tcp_vu.c
> +++ b/tcp_vu.c
> @@ -115,8 +115,6 @@ int tcp_vu_send_flag(const struct ctx *c, struct tcp_tap_conn *conn, int flags)
> }
>
> memset(th, 0, sizeof(*th));
> - th->doff = sizeof(*th) / 4;
> - th->ack = 1;
>
> seq = conn->seq_to_tap;
> opts = (struct tcp_syn_opts *)(th + 1);
> --
> 2.53.0
>
--
David Gibson (he or they) | 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 --]
prev parent reply other threads:[~2026-03-23 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 13:51 [PATCH trivial 0/3] tcp_vu: Remove redundant header field assignments Laurent Vivier
2026-03-20 13:51 ` [PATCH trivial 1/3] tcp_vu: Remove redundant eh->h_proto assignments Laurent Vivier
2026-03-23 23:08 ` David Gibson
2026-03-20 13:51 ` [PATCH trivial 2/3] tcp_vu: Remove redundant eh->h_source assignment in tcp_vu_send_flag() Laurent Vivier
2026-03-23 23:10 ` David Gibson
2026-03-20 13:51 ` [PATCH trivial 3/3] tcp_vu: Remove redundant th->doff and th->ack " Laurent Vivier
2026-03-23 23:11 ` David Gibson [this message]
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=acHIq79YgQEQ75SP@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/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).