From nobody Tue Dec 26 21:12:23 2023 X-Original-To: dev-commits-src-all@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 4T06sz4KLgz55XVg; Tue, 26 Dec 2023 21:12:23 +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 4T06sz3rn1z3W1v; Tue, 26 Dec 2023 21:12:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703625143; 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=aOdtJ3I7ocI/AJ9KHmkHlJgsf9qA4Ob+q7z5FCiTo4s=; b=gpxM4L4XF1m6zyhiy22q3pB72KN/Nm1kWhaLXAcqWnIJHtyuIQXg45Z0ZtyAD5ENK93jXd nWdOj9fE7mlEDFpxQKKalhntbwS5Ge/as55pceV/m6jqVWBvFGc8QaYh7jRdnLEZRL6pEv FT0uky+/3AWYN8pgT9rJlcsXywVQ8vmd6V/EPVPUsQ89pUQF7wk+ahY/J/nqIbYU8EzcEX qCJl0MHM3Qslq/qXypY+P7hAT5hspj8qXgZzp2Ebz5eTDwrZBMrl9iacfDs8qA57JFyE7e jvm6S22wAXA024j7FLsLqeaPRVmkgz+ekStrhnePY75PmEdkvdtuZ/9vdN5U1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703625143; a=rsa-sha256; cv=none; b=AFm7RgthK0x7NwsOoulkKbcFdIsGO7kCiiyEoZfAoJ9izP21IHjVq47I3VkWWH5fxySdw7 Gdmzlg2yi2mLj69VwyaSUYZlYZtk6fiZHi/Y+rSAmzovzbz9K9NFj9cJKy6Bi9Z/VB3u5/ aUr2nBWEWliwyjtZfW1DEJZkWGe+iMwNWQFtP4juaE9h/fJQJHzm/KQsGk+ZO+ZF1vaIZG xmlEQEQSARVwSdCg2dIny42BbhQkjk5UjZejU6aIcFoJVpqyd1SMrda8fY7SKKsHfF1a/y Oo2SYFOCN9MupT4NnKGaL3hLzui+vcg4/WFbX6f2MG6R+6f5ztK5dvxsAXSr4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703625143; 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=aOdtJ3I7ocI/AJ9KHmkHlJgsf9qA4Ob+q7z5FCiTo4s=; b=Vs4EBr/7PrJoH/FNRfjKTjJI1LEzTw+Q/v9GryrSaLCVw6tBEFjcjx7N3T1CWM+Xb2/FKB STIc9yJBGr+jV6T4ndqIhVP/QVk3p7oS96Lqmgn5mBFANEfZ0XyByogaB+vLlcNYl5EGnm nDDPUrpZkHq0fPjO5DGM4Us1kTZ/ld/aUDyxleKIbkjMdGtQTcFEA7AYltEQ4tyPGhyqcJ A/BGOkyKzdzUd/wAAs6V5AGtPRMJfXjLyIY9PBJBW1ZAmnradJHl8B/tWFsyFC2HB1/KqU rcDkC3N2/jTFEg/IFfOJZNXRE0lbICYCNxNMe/2kHu8K0xikNBQkqGPSJ3cG4w== 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 4T06sz2wg5z19jG; Tue, 26 Dec 2023 21:12:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BQLCNgs030801; Tue, 26 Dec 2023 21:12:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BQLCNAs030798; Tue, 26 Dec 2023 21:12:23 GMT (envelope-from git) Date: Tue, 26 Dec 2023 21:12:23 GMT Message-Id: <202312262112.3BQLCNAs030798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 08c33cd94da1 - main - hpts: avoid duplicate call to tcp_output() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08c33cd94da18b4cae73a4837e13f677345a6c1e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=08c33cd94da18b4cae73a4837e13f677345a6c1e commit 08c33cd94da18b4cae73a4837e13f677345a6c1e Author: Gleb Smirnoff AuthorDate: 2023-12-26 21:09:09 +0000 Commit: Gleb Smirnoff CommitDate: 2023-12-26 21:09:09 +0000 hpts: avoid duplicate call to tcp_output() Obtained from: rrs --- sys/netinet/tcp_hpts.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index a6fa79a26949..73e9997c060f 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1364,18 +1364,23 @@ again: * We also only call tfb_do_queued_segments() * tcp_output(). It is expected that if segments are * queued and come in that the final input mbuf will - * cause a call to output if it is needed. + * cause a call to output if it is needed so we do + * not need a second call to tcp_output(). So we do + * one or the other but not both. */ tp->t_flags2 |= TF2_HPTS_CALLS; if ((tp->t_flags2 & TF2_SUPPORTS_MBUFQ) && !STAILQ_EMPTY(&tp->t_inqueue)) { error = (*tp->t_fb->tfb_do_queued_segments)(tp, 0); - if (error) { - /* The input killed the connection */ + /* + * A non-zero return for input queue processing + * is the lock is released and most likely the + * inp is gone. + */ + if (error) goto skip_pacing; - } - } - error = tcp_output(tp); + } else + error = tcp_output(tp); if (error < 0) goto skip_pacing; INP_WUNLOCK(inp);