From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id A4B035A026F for ; Wed, 29 Nov 2023 03:34:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1701225281; bh=9lFewKG5gBwqb2jUeD1rdA4fgvHk77Spp2leXBghgeo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iFV/n3/7rN1lioPfiO99MtbYMgwH/RMTszZEHf4kmO+BJ8HGi9FWjRL05oaD70PSi M+1JgJXHuF+wKnbOn+vkLDLPbZXvM2QmuRsLGVlLN/OSm6Kti6+6skuv9KpNYpVcEq gwwiHel7qWMw2uEQRP0gtGMKD+D4N1Wy7/qsSSGs= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Sg3Ln0VQ1z4wdD; Wed, 29 Nov 2023 13:34:41 +1100 (AEDT) Date: Wed, 29 Nov 2023 13:34:32 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH] tcp: remove useless assignment Message-ID: References: <20231128165423.1845799-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+6rwxwDXsyY8ne/i" Content-Disposition: inline In-Reply-To: <20231128165423.1845799-1-lvivier@redhat.com> Message-ID-Hash: 5WELOMBCM6TKETSHCCNMWWXVPRTXMHPD X-Message-ID-Hash: 5WELOMBCM6TKETSHCCNMWWXVPRTXMHPD X-MailFrom: dgibson@gandalf.ozlabs.org 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: passt-dev@passt.top, 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: --+6rwxwDXsyY8ne/i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 28, 2023 at 05:54:23PM +0100, Laurent Vivier wrote: > In tcp_send_flag(), a4826ee04b76 has replaced: >=20 > th->doff =3D sizeof(*th) / 4; > th->doff +=3D OPT_MSS_LEN / 4; > th->doff +=3D (1 + OPT_WS_LEN) / 4; >=20 > by >=20 > optlen =3D OPT_MSS_LEN + 1 + OPT_WS_LEN; > th->doff =3D (sizeof(*th) + optlen) / 4; >=20 > but forgot to remove the useless "th->doff +=3D (1 + OPT_WS_LEN) / 4;" >=20 > Fixes: a4826ee04b76 ("tcp: Defer and coalesce all segments with no data (= flags) to handler") > Cc: sbrivio@redhat.com > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tcp.c | 1 - > 1 file changed, 1 deletion(-) >=20 > 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 =3D htons(MIN(USHRT_MAX, mss)); > =20 > data +=3D OPT_MSS_LEN - 2; > - th->doff +=3D OPT_MSS_LEN / 4; > =20 > conn->ws_to_tap =3D MIN(MAX_WS, tinfo.tcpi_snd_wscale); > =20 --=20 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 --+6rwxwDXsyY8ne/i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmVmoyIACgkQzQJF27ox 2GfHaxAAjVApn4s6qkW4bERDuL677yJdIg5YkXu8T9qW1EmiXbKYr2Io5vXno1HD 1v3ybGGY5XXn+LYP7TyFXKMhTu5AWNUGlNZnBBobFhEuDpaVLL713zdJ4dr0LfZE lEOw9fwcKYi5rNtpKx6TfCy++YOCBZM8gcXC6NIP4Nnot312GEeO/jOiZ7d6SRWI FCWGCdp8XSnc6OBkseG/RyodtoM49nstkcELtV27l88JCNqkoshNsoBnEczVo4Qv l6Rbzu6/tu1iODbZI0yUzML3RT1MYYURZVPakqUMSSoMIjkedtvLccbpXxrVNY7n Umc7ufdJ0QB6dJk5/wLDLY0Y71ugpiqJSO4/fyrFQ+x/6X+7dR7PS3gF0Md2p9n/ +CLjG4+ZJd80QPiv3B+XHELfwgdOsdtdbH/bzWxf9si3972LocT+mqk0Xo1AAojo e93/H6fUi+wEwzgWUu4Vt6nxnSCIgq+1WiN7RNNhbu5buIPvmhE9YZbsBpQMs54Z mGAeOXGqRbUqLNOoZgLcYMHEhbPuKtN1Q97djW7aYha8rlbjgoHaFh9DIOPga2QW uBK22SJehHBLCQwSqojCdV4KNEENxpwe5WxPvSIP7uVtPYXgN4k34c3erP92Awrs Rs37ZAgPZt3ISI2CT/idp717e8sHAMDiztSLL18We4LZfS62KBA= =EScv -----END PGP SIGNATURE----- --+6rwxwDXsyY8ne/i--