From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>, sbrivio@redhat.com
Subject: [PATCH] tcp: remove useless assignment
Date: Tue, 28 Nov 2023 17:54:23 +0100 [thread overview]
Message-ID: <20231128165423.1845799-1-lvivier@redhat.com> (raw)
In tcp_send_flag(), a4826ee04b76 has replaced:
th->doff = sizeof(*th) / 4;
th->doff += OPT_MSS_LEN / 4;
th->doff += (1 + OPT_WS_LEN) / 4;
by
optlen = OPT_MSS_LEN + 1 + OPT_WS_LEN;
th->doff = (sizeof(*th) + optlen) / 4;
but forgot to remove the useless "th->doff += (1 + OPT_WS_LEN) / 4;"
Fixes: a4826ee04b76 ("tcp: Defer and coalesce all segments with no data (flags) to handler")
Cc: sbrivio@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
tcp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tcp.c b/tcp.c
index 40e3dec1ca2d..bf5f315afcac 100644
--- a/tcp.c
+++ b/tcp.c
@@ -1693,7 +1693,6 @@ static int tcp_send_flag(struct ctx *c, struct tcp_tap_conn *conn, int flags)
*(uint16_t *)data = htons(MIN(USHRT_MAX, mss));
data += OPT_MSS_LEN - 2;
- th->doff += OPT_MSS_LEN / 4;
conn->ws_to_tap = MIN(MAX_WS, tinfo.tcpi_snd_wscale);
--
@@ -1693,7 +1693,6 @@ static int tcp_send_flag(struct ctx *c, struct tcp_tap_conn *conn, int flags)
*(uint16_t *)data = htons(MIN(USHRT_MAX, mss));
data += OPT_MSS_LEN - 2;
- th->doff += OPT_MSS_LEN / 4;
conn->ws_to_tap = MIN(MAX_WS, tinfo.tcpi_snd_wscale);
--
2.42.0
next reply other threads:[~2023-11-28 16:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 16:54 Laurent Vivier [this message]
2023-11-29 2:34 ` [PATCH] tcp: remove useless assignment David Gibson
2023-12-04 9:54 ` 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=20231128165423.1845799-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).