From nobody Tue Aug 02 10:49:24 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LxsF051Mtz4XkG2; Tue, 2 Aug 2022 10:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LxsF04Wzqz3CxB; Tue, 2 Aug 2022 10:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659437364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=khGLEgjfjt+KQffjGyesrrq4ZiQJWzRdgcYqjpV0Ye0=; b=Uvrv6g7vN+5ticQZYmsZ+FBYwl4jmxd4+ir145RjMXPsE8uHMuzhKxhtu0CedZI8kjKOSX v7wVTMG8UjTQ/dzD1Ji+/3jbLF6L9Bgr3GFm3wDrnGdueUZC0JvjLBfBRHBSJhdVKf23K/ yaTjr2107XZG2wYk2w1K3Z4beVLcdDDKMM5IV8u2yavwsxvuXe22PPxx2sbG+Eow2wF4+C 3kErT64XXYtJvuq2rywjfy07q1I3POniBENLEM7qNKw4vWKztZ1YH2bOqRMlXVU+yWCPWR adBFf1xOeRphAn0a3osFk3MCyWBsaPbuNMqOvypTxgxDyaZGuLtQ3zNRwPVN9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LxsF03b9Vz18QC; Tue, 2 Aug 2022 10:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 272AnOW0090687; Tue, 2 Aug 2022 10:49:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 272AnOVF090686; Tue, 2 Aug 2022 10:49:24 GMT (envelope-from git) Date: Tue, 2 Aug 2022 10:49:24 GMT Message-Id: <202208021049.272AnOVF090686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1abc27dd52e5 - main - tcp rack: simplify computation of rsm start and end List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1abc27dd52e5fd151472439004f20dc798887ae1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659437364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=khGLEgjfjt+KQffjGyesrrq4ZiQJWzRdgcYqjpV0Ye0=; b=Sxy7krhaffUDlLHfUAmVxciwY7R2Vm6f8fffErFcMXt4REFTRes9KFStFAWpU0eGhnmNVA OD70zlqlNqpDyZe3kWMEu/6U4tDE7kGrwwlJ59FpWsqTPPE1HbTPa83GKK1t6VJTnf3iGr cKWLLXWT+zYdGPH4jA+r0h33xQjyDqv8FVM6bsEn/QEMji/lWRqDy6fnyQzJNkYUmUfIwM LQlo0DMRLv81aKrth4ibK0d8y1tfGRL1uIW/6CAGOUeKTqMgW8207QStuoj7oCekjtIUdM m0moOmCxpdnwPn/oexjX8CYz7FmIHlZKZTa0+LtRdpDz0f9/lnwGsizV5f0ayw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659437364; a=rsa-sha256; cv=none; b=POQLkOAK56xLr/7L1ZnuNdTLfzMY4mrLoh5ANkP/Dz/ZEppnZRCbN3qZxP9bRW/gpX1U/f AS/Ow/8r/BRcBawpmgGHY6N+wfmTBK4bi6xBF1yHZKM7ycd7axT3z2PBubBNcZfV1nFNWu PKz6YsserSbAAjYDhruC6UXs9FGAJxfSTlaYX/LN1O6roIHhWZszN+Znt8lKa0HuBnpVnn 2jhWjcQgNnKFRGNgZ4n5I9OCiYRDVGcPEiWUNgVM3eEQBendgVgHwV6+fVqAWvUvvkXw64 DgDp0oxjIbgTOUMi5Cb2EBEmzeWQbqbA68v5agFZxlV3IlF9iOyzuVNwPYcBzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1abc27dd52e5fd151472439004f20dc798887ae1 commit 1abc27dd52e5fd151472439004f20dc798887ae1 Author: Michael Tuexen AuthorDate: 2022-08-02 10:45:56 +0000 Commit: Michael Tuexen CommitDate: 2022-08-02 10:45:56 +0000 tcp rack: simplify computation of rsm start and end While there, also fix the setting of the SYN related flag. Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D35862 --- sys/netinet/tcp_stacks/rack.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index ce33f507bc1c..c3008b38dd4f 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12610,14 +12610,11 @@ rack_init(struct tcpcb *tp) rsm->r_rtr_bytes = 0; if (tp->t_flags & TF_SENTFIN) rsm->r_flags |= RACK_HAS_FIN; - rsm->r_end = tp->snd_max; - if (tp->snd_una == tp->iss) { - /* The data space is one beyond snd_una */ + if ((tp->snd_una == tp->iss) && + !TCPS_HAVEESTABLISHED(tp->t_state)) rsm->r_flags |= RACK_HAS_SYN; - rsm->r_start = tp->iss; - rsm->r_end = rsm->r_start + (tp->snd_max - tp->snd_una); - } else - rsm->r_start = tp->snd_una; + rsm->r_start = tp->snd_una; + rsm->r_end = tp->snd_max; rsm->r_dupack = 0; if (rack->rc_inp->inp_socket->so_snd.sb_mb != NULL) { rsm->m = sbsndmbuf(&rack->rc_inp->inp_socket->so_snd, 0, &rsm->soff);