From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by passt.top (Postfix) with ESMTPS id EA8965A026F for ; Tue, 28 Nov 2023 17:54:27 +0100 (CET) Received: from lenovo-t14s.redhat.com ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MsZ7T-1rRjth0mGh-00u3BG; Tue, 28 Nov 2023 17:54:26 +0100 From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH] tcp: remove useless assignment Date: Tue, 28 Nov 2023 17:54:23 +0100 Message-ID: <20231128165423.1845799-1-lvivier@redhat.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:PVBoe1b5kBE3DsBwLwKCeDKCBOGjy0CXC6Y+WDDrhcsAuj1MRJj SY7pSUQZ849f1icMzgdbDkrrq+Z/CV3np0ZRJLTXXgYIqW78RnoEjP/8hyYyhO/KcUJo1PB z+XbKmsfMZpR6ovG5gPQ5N9IScGkyhsMRJiA9tToSwhVpEdw9pUbzsvjr+IG/7jlk1WwxLp fvScYURLmxO1ZTQQ9KvoA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TS/+79hXoWk=;3v9e7CZNVu/3NTzRlYRzpv5U8sc M0UjpKpuFVIE4YO3/waOlPNt6yf6Hxi9UPYKu/myxhKmibLuyD0UhD3zgR4VdXk2Dx2xVtKyu gr9STW7+bnBhawdmzKWCmW4aaLobfCaRA17HnBDeKLxI7fy0zZXiJ7JpcpLT6naZylEBWAAvn Pz91t4KoRfbSEHq02G3RjwyoBQni/KKY9X+xYIxrCMNBVpKUEfe1dC9wJYsJen/Iik9Ok299J ykltrXWIMFbsLdQvyNNNM9LTe6Ba2RWfD5/UlCMwr9EmTzC+M2l7T/sRNlwDJWE+mGqx6Fsgy +XF5Ib1X/QnfckD2Ktid5D+9MfOIt7ylZl5zRi71EagYsYBMG/avIzVprs3kTTIOnxveZn4xU 1zlxREHSiT/P1k1Px+ucS9aBXKMUyBT8diDj2tRWN3uMoPAcUPp5gWGifJ9w3BoHjxfT6mhMf /XtAeJOmmPjRN+cQvbAIIqUzF4GhvgmqDrEnF6Jez9EB0kI2aVv1wWOEK/oaTX1aYyx7FiL5N pnEWaRSSSDCulbw3S2maUgmHsRRZXvdXgFnRhXfsVhM7BWWLdrUgU4Jfk04mmWWvaRnODy2n6 ZOIN/2kiON3idbU0Dhe3rMYga4vnKyC3hVaOfifnn8mNkCksx/QG35ZKE4bXcn+HNin1uqwAw DAySGLPOkg9Sctj6Ek1VgOaA7A+W/JKeJlLMVfh7ExMaxhtGqQOkXC35ejIb6eBemHz9ddZaF xKbd97Jh9ASnrQcuGrJfxszAp7J3C3/TwzlOZQIhBY6oBlA/+KCnOyEjF7rVhiC1RtK95amjh eENDb9Fgs1LZCUcMhQHepOzZJTQSD5pAMFWpoV0+vfdz4wahF/+vDv4a0IGOJ/2d7nGaxYusZ ETfFDCtkopF2LHA== Message-ID-Hash: NNZ6LYX3TLUDHF5UNL6RFRRGUEA5U47E X-Message-ID-Hash: NNZ6LYX3TLUDHF5UNL6RFRRGUEA5U47E X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier , sbrivio@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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); -- 2.42.0