From nobody Wed Feb 1 23:33:38 2023 X-Original-To: dev-commits-src-branches@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 4P6dXL5vyvz3cL7T; Wed, 1 Feb 2023 23:33:38 +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 4P6dXL5QZlz3M85; Wed, 1 Feb 2023 23:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294418; 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=LQGUSKaHpwgPxzsgaI95R2GjKl3GktvoHmOSgXWuwyQ=; b=ASoPGi6PGeWmSj1JcuDh3vNS0W2gSaNMN/Vbc4tLbR+YK4yDpcfC5fkXnDpavtnKYmjYpu Ytz0qmMbb46mEt9u6PfrEz1O6m3Zqddjbeloxtup+FcAgBHKcawzt22lue75bDCqdthr55 zPjexnhyfHGQxQ4o3GPH3Opxr2E1xgiy+SSylefSvyOQ88hVUIncFCYbHa6bGATgTb13/X 1kRPHaEaywUSpS+hvKv66qqy0cdY6SAcDcxzLCvWKPgyBBOlmaoxQ2PIzsQ4O0nPUNVyEa H0DPJPp3XxEQk43G9FzwrCMTm4EWzAwzwkb54a5+gpPf22FKI0u2azWE3O5czw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294418; 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=LQGUSKaHpwgPxzsgaI95R2GjKl3GktvoHmOSgXWuwyQ=; b=NY2nHdGVl2udoyl6q/kcsDm6xtkYs81FX6hrATToA/2EDy8wJMfAMvxthOx3YtsLp8vA11 hJ8W5Lim/WeBUmqOGwMB6ylPq7CAyRnpUZRiHDk9qF5uU44l3GPLBvhQB3WBw/P6gHOGHZ Q7NCBDsDatJS/r2iY3ZRBQYX68sqrYauKP+d7/xKrP7ElbypflskRFQ7Njb2lka68rwWcB hWrMYdriCrHisHnfCovvYJ9TAtl2Rqqvr/lXGnkPPsJtRvRU4E7of6leuxVSbPV8olROY8 z/wwOp4m+ZNSUVsq7qAOKvyLtzE4bPhSwfDLThF3XotvNNtE7xOUzDhJEcG9uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675294418; a=rsa-sha256; cv=none; b=m3Klrn8J0Ho0p8/o4jo16kyT3gBQ0Eolg5bLLg5A8CJ9V6KmAIhqKpQjELGhwOybZsPn4Y 5im8dzlF9IGeOgSKaoWW5zHyS/kVZc65SPrRX8FDIRj38lTuqKSvKSoa50ovGjkDRk+8Sk ZFOCGWM4AZyCR0ogcLCm2wQy+KqgQwtqmPGCLt8kudLQkRrPHVxxekdxF+X0Q8nqH6O7lR D5teLot4MAjsLiWzSgha0AS8g7zbFIA40Np6dWWywoSwPC6oxAki5SPTO3mrua3GgIT7OE hDtmFzbY286mRWyuJs9eLi8r4Lfj3J3btVmtz48d7lxvQp/ErbI1MPENrPXAJA== 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 4P6dXL4VlYzYW1; Wed, 1 Feb 2023 23:33:38 +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 311NXcKS076011; Wed, 1 Feb 2023 23:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311NXc4x076010; Wed, 1 Feb 2023 23:33:38 GMT (envelope-from git) Date: Wed, 1 Feb 2023 23:33:38 GMT Message-Id: <202302012333.311NXc4x076010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 423b1e36a64f - stable/13 - tcp: improve BBLog for output events when using the FreeBSD stack List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 423b1e36a64f187f6bf2eea01c8864d24cc40658 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=423b1e36a64f187f6bf2eea01c8864d24cc40658 commit 423b1e36a64f187f6bf2eea01c8864d24cc40658 Author: Michael Tuexen AuthorDate: 2022-08-08 11:07:10 +0000 Commit: Michael Tuexen CommitDate: 2023-02-01 23:33:06 +0000 tcp: improve BBLog for output events when using the FreeBSD stack Put the return value of ip_output()/ip6_output in the output event instead of adding another one in case of an error. This improves consistency with other similar places. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D36085 (cherry picked from commit bd30a1216e03e14cfaa7e91b1fc72ad76e9cd240) --- sys/netinet/tcp_output.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index a30f8eab389d..fea54cdcc5cb 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -219,6 +219,7 @@ tcp_output(struct tcpcb *tp) int tso, mtu; struct tcpopt to; struct udphdr *udp = NULL; + struct tcp_log_buffer *lgb; unsigned int wanted_cookie = 0; unsigned int dont_sendalot = 0; #if 0 @@ -1452,8 +1453,13 @@ send: TCP_PROBE3(debug__output, tp, th, m); /* We're getting ready to send; log now. */ - TCP_LOG_EVENT(tp, th, &so->so_rcv, &so->so_snd, TCP_LOG_OUT, ERRNO_UNK, - len, NULL, false); + /* XXXMT: We are not honoring verbose logging. */ + if (tp->t_logstate != TCP_LOG_STATE_OFF) + lgb = tcp_log_event_(tp, th, &so->so_rcv, &so->so_snd, + TCP_LOG_OUT, ERRNO_UNK, len, NULL, false, NULL, NULL, 0, + NULL); + else + lgb = NULL; /* * Fill in IP length and desired time to live and @@ -1553,6 +1559,10 @@ send: } #endif /* INET */ + if (lgb != NULL) { + lgb->tlb_errno = error; + lgb = NULL; + } out: if (error == 0) tcp_account_for_send(tp, len, (tp->snd_nxt != tp->snd_max), 0, hw_tls); @@ -1666,10 +1676,6 @@ timer: tcp_clean_dsack_blocks(tp); } if (error) { - /* Record the error. */ - TCP_LOG_EVENT(tp, NULL, &so->so_rcv, &so->so_snd, TCP_LOG_OUT, - error, 0, NULL, false); - /* * We know that the packet was lost, so back out the * sequence number advance, if any.