From nobody Wed Aug 10 10:23:03 2022 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 4M2mGw1LrRz4Yh8N; Wed, 10 Aug 2022 10:23:04 +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 4M2mGw0vTFz3Fj6; Wed, 10 Aug 2022 10:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660126984; 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=kCvRiN7mbqiEVtVNuHDzLpDSL4Kmx3nXhnbMLFirsFs=; b=iESA6sBUKo4+XfCSi7ry4ET/FcD5WZvByU9FYm0Coziu6DwgxauFakLwUtMPusKLg5Jmac Hld55np6jB9o0mWoUrFHoDD/d5szNpkZk19kSg2OrTTV8QYoGBm6U6MCpc4DZdhRJ/QoOF 4XUojbMD8PVpizpdrvkZZZ4Yj4DO6QA0E56ypUu3ZyDFmCJwiIkweib7ZoTzlVHvYdixbA 9bWnUjT6XkXu9czLJ1VCaj/ErixsiIz/YP0QQvzPAHB9EawjJtYugO7f+gpi23TWTgrwXr uxLNMAgV7GTsUjVFlaaDjAJufWHTN7e65anw44U6Dq44nSs6rrYg2ZOmzhQkjQ== 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 4M2mGv7403z17Y2; Wed, 10 Aug 2022 10:23:03 +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 27AAN3n7008305; Wed, 10 Aug 2022 10:23:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27AAN3xf008304; Wed, 10 Aug 2022 10:23:03 GMT (envelope-from git) Date: Wed, 10 Aug 2022 10:23:03 GMT Message-Id: <202208101023.27AAN3xf008304@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: bd30a1216e03 - main - tcp: improve BBLog for output events when using the FreeBSD stack 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd30a1216e03e14cfaa7e91b1fc72ad76e9cd240 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660126984; 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=kCvRiN7mbqiEVtVNuHDzLpDSL4Kmx3nXhnbMLFirsFs=; b=i2NCekogKt/NuLIwpS87zwTTtKmHMzQMHHyXnrxMTlQ9pi5StZyl8o+cL7D5maM+hiAKEd ZEgLTe3FHK8kScobyVPhlHjhj41hihXN/a0V/8khtoeEIRcEZzL8wJJ6S1ia3D99f5jjEc bg/eCALAGxdahbwvnaunNTDCdd1qUHTOU6KpsTTwXUEA6bS6jBqyNXBQhrs/WEEAYvEaSp ExcWI5vxL8JluaiOu0sSnYngxKC9hDyBYJp12kn3iH0ferZ5U9n0yv4mtrkhrkVh8397c9 pX/dZBPSynpMM22emWah2RHtchyQAVWITG5zM6uS+d8J+x4E2BdJ8VnNKezCjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660126984; a=rsa-sha256; cv=none; b=iBjux6E1H3iFplQr/6vNZTRI9NtzqWTRQHPYcClQoDgQV+kaJ3E/6ZmjsUXkXsc+TiqI+q 4UffeWRV0uxB2/QLhX80gJRbBbUF8XKdfiC8p1EVxT5sG/58RAsT+IYIk1JODkPOnGkLYD yxh0BfnX3/lD3XKcQBvU9oP3Drro5nWUw4RVCsWPZkMcJHoh43/g+iuCw/MJ64A3qupAzZ FfXBo6XnA8ToB32LGtTUGiMUiy32dklZ0wnHe7zYrApI5DN7jTVQHJqcoYjFlAxP1D0DpY UC5RzC33lwrNfrdOs3Z4yOM46Sl9FxiWPYfbJOA7dof5oet5rrhKqEkGG3YnkA== 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=bd30a1216e03e14cfaa7e91b1fc72ad76e9cd240 commit bd30a1216e03e14cfaa7e91b1fc72ad76e9cd240 Author: Michael Tuexen AuthorDate: 2022-08-08 11:07:10 +0000 Commit: Michael Tuexen CommitDate: 2022-08-08 11:07:10 +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 --- 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 d2f946034c60..4aa2f3664c55 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -222,6 +222,7 @@ tcp_default_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 @@ -1441,8 +1442,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 @@ -1542,6 +1548,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); @@ -1655,10 +1665,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.