From nobody Tue Jan 16 19:05:24 2024 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 4TDz3m6F0Kz57qq5; Tue, 16 Jan 2024 19:05: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 4TDz3m3Ttwz54tT; Tue, 16 Jan 2024 19:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705431924; 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=uO8qW+/9EiqzYhvf5H8ECufyq0gVYmSpjKm5K7SiS14=; b=nHrYDehBddBLu1adRQ96gh6QnHnv9lrZjxeg0HWeC7fqu/0loAEecLbyFyBairBjg86LxN wDkRxB0SPyGyunHWqNgU80k+gce4nhFefu3EStmgQhm8cMN/p9rsOsKAq38d6flivpuvhw AyeyN8bTsc3xX8fWUjKPvTU76Ryn6Cnz/bzLrubsP0Nt/eBhkSLL3xAg1jhWrRUo5V8fW3 6v7yWSN0YHPX2ONXeoKhh5zvLxfDVKU/42gjzJ7cw/gDPGAdAXoH/FIQtr22wHEAzQOMpK 395NCL6TbEYxnKYR5PKSpLgwF6ULNCBzNdM2oB3T01aZasGY9BhI2J7t4I7R8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705431924; 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=uO8qW+/9EiqzYhvf5H8ECufyq0gVYmSpjKm5K7SiS14=; b=VmN41sdeEPzfmyBplIejKUCHTdK7LoRydHEg6D+XS++7ALAkOWQx4Fztq8TuXy//tHXh2s JWS+7MfUVgbMYGreOWdEiNmfPe9PCCE0d71ytK0xigzvRL77rqQ9F4q3Ai2+4roX+7imn9 xVV0YylQj7t+mDlFrF9qchB/WMA+vKIV5vHAxFSlEWJm5py1Aa2AfXfK2jA+7kSXFc4p8S g5+Fi8vbF25e7NLw85RZnblH3uzKfxPXMMJAgfUMDjkfK63nrrEvPfQd4XGnP9fjA62yQx vtSNLNP2oEyv7so3yWutV/A5Mdi04+9tO12S9T4u9A10EdRzvCE+riQHJKuzXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705431924; a=rsa-sha256; cv=none; b=PVDaJy9j5gJT2/Xcmn5Eg7NpUXHBseiUYgIAVMosNKIvrPwFf06cDBxZb6j/3SQtIGdcn8 F3Otv1cNbf97G0weDWr2xSZbquV+BaiYNcR0Nbm2to8bdGtLjHJ4bFGEXD7dPzewlEq1n6 PPDR277Kau0rCbiCxEhGPo0KP7EFmEU4LvO7AzP3ABWK0P+ZXb6lgtRQQyTfvhH3E2IMch gdOftY+xvKB8ETa17ifVZwHEYrywmCmNKBtUc7+YKVSfZnxkrP553x+cMmypYr8yEJVBah xHYXwpdSlVOKGOaCg+gg7NEkXHWH3xxF3WBjQE7EW4BADRfCiG6L75W4T1r7yA== 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 4TDz3m2YcrzsLL; Tue, 16 Jan 2024 19:05:24 +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 40GJ5OZE010623; Tue, 16 Jan 2024 19:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40GJ5OR2010620; Tue, 16 Jan 2024 19:05:24 GMT (envelope-from git) Date: Tue, 16 Jan 2024 19:05:24 GMT Message-Id: <202401161905.40GJ5OR2010620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: c815844c5a60 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: c815844c5a6037f138fbd531b3fa4d3859cab5d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c815844c5a6037f138fbd531b3fa4d3859cab5d8 commit c815844c5a6037f138fbd531b3fa4d3859cab5d8 Author: Gleb Smirnoff AuthorDate: 2023-12-26 21:09:09 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-16 18:47:50 +0000 hpts: avoid duplicate call to tcp_output() Obtained from: rrs (cherry picked from commit 08c33cd94da18b4cae73a4837e13f677345a6c1e) --- 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);