From nobody Sun Nov 17 18:21:07 2024 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 4XrzbS0fQ5z5dDx7; Sun, 17 Nov 2024 18:21:08 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XrzbS07Vtz4p0J; Sun, 17 Nov 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867668; 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=kUJpZBIuxQ6JLT/m/U5R4j5GzKWhvAXLCAH8Wqor9F4=; b=GWdqE7c6l/gmj1FuUBG1tJ2/LZOoIjKsuq0I7iREip0nr3xsm/tPOGmLsPpGqSNIWc5grS QkdYOTCmKLgnbs+g5lo0S3ITE2S0n3xdjFxySUFGG/O2SPOChB0K/QoiGX3mydMsbtLnCN g5ifZzd8v9E10eZVJN4hq6LZCXeNnuIO2hUlD0N/cl9emUoHELTYzG4wyV0LBCrAJKNCl9 1SuoExlUGy4rcrcaG1vW7j5jvilLbSuFC//blhZ3/yKEm/AWEmiI/kOnppMBybpNo4286n yvnTo9Nxyaxs6fvPJCqqqcLfSpDt7CKzJX/yrXG+NhAyGCkVCKVu0AHz0eidxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731867668; 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=kUJpZBIuxQ6JLT/m/U5R4j5GzKWhvAXLCAH8Wqor9F4=; b=bj1q6QeyO/eU8J+gR3U6OzO74ch1rLKfnF6h7uInxJKSJYFCc3xk8Dtu2SBUNIVxX0lqpK y8qffbOX6F2hwbzqf1VBJTSWzRVByyc0+I1nYpPCtmh1m+Zft0F2wObEXQrlQdzE6Bh4n7 Q/hRWQ3/1mZC//YxF36PEtZnHxcqidZiOPAn/ZnWBHWA2OCEakUoZRzzEwFUqm7lS3V394 8+GpJjya8gDvuoDpbK2zCtKj6uhjL16NONvm4qHzWB9JkJSzPL1RHCQyPDvf4SRvdLMTEc Fg9qbeZssqm6M/BdqdFAQM1oyCLrPwp47/ZRUjfafh6gYPAZeIJFw0kUOJoz5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731867668; a=rsa-sha256; cv=none; b=CXKsmd9ogSJM9ZONcplNxfw3+kaaKDKjgeHFuKtJxWq2DUSWKxLyqcY3QSI2Kt/qaHb1GH jnDnN6FUM5KWjqzGAfj/4/MdM/DGbQBOcpY/1RKGq/Tx0Vbb1HfVKKN10EXaDAslVCPpmm ev+cZ13lPbiaudHpKfyxoQoMxp6MSiTIyW+hJrxv4w4yYhyoY1oZxwF+9arLvPFXnav/QU 3cp/2T7JvD1kdX0nxsOSEeM4rcKyjUsDPRlzWpR5vD+Wgq5OcLhfbv9+mxc5V8hI3CcIZu dKLVF1YTx9H7Sh1GQWiBpyf/dT56/vIcRsNIPrdvoeObvzb+tCfp/Gkr47wFWQ== 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 4XrzbR6lCmz12bl; Sun, 17 Nov 2024 18:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AHIL7b2010030; Sun, 17 Nov 2024 18:21:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AHIL7TM010027; Sun, 17 Nov 2024 18:21:07 GMT (envelope-from git) Date: Sun, 17 Nov 2024 18:21:07 GMT Message-Id: <202411171821.4AHIL7TM010027@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: 8caa2f5351de - main - tcp: define tcp_lro_log() only when TCP_BLACKBOX is defined 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 8caa2f5351ded559c68ba0cd4713e00136801bd9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8caa2f5351ded559c68ba0cd4713e00136801bd9 commit 8caa2f5351ded559c68ba0cd4713e00136801bd9 Author: Michael Tuexen AuthorDate: 2024-11-17 18:16:27 +0000 Commit: Michael Tuexen CommitDate: 2024-11-17 18:21:01 +0000 tcp: define tcp_lro_log() only when TCP_BLACKBOX is defined Reviewed by: rrs, Peter Lei MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D47401 --- sys/netinet/tcp_lro_hpts.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/netinet/tcp_lro_hpts.c b/sys/netinet/tcp_lro_hpts.c index d56967a12809..7e756285da45 100644 --- a/sys/netinet/tcp_lro_hpts.c +++ b/sys/netinet/tcp_lro_hpts.c @@ -62,7 +62,9 @@ #include #include #include +#ifdef TCP_BLACKBOX #include +#endif static void build_ack_entry(struct tcp_ackent *ae, struct tcphdr *th, struct mbuf *m, @@ -148,6 +150,7 @@ tcp_lro_check_wake_status(struct tcpcb *tp) return (false); } +#ifdef TCP_BLACKBOX static void tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, const struct lro_entry *le, const struct mbuf *m, @@ -197,6 +200,7 @@ tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, TCP_LOG_LRO, 0, 0, &log, false, &tv); } } +#endif static struct mbuf * tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, @@ -209,7 +213,9 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, m = STAILQ_LAST(&tp->t_inqueue, mbuf, m_stailqpkt); if (m != NULL && (m->m_flags & M_ACKCMP) != 0) { if (M_TRAILINGSPACE(m) >= sizeof(struct tcp_ackent)) { +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 23, 0, 0, 0, 0); +#endif *new_m = 0; counter_u64_add(tcp_extra_mbuf, 1); return (m); @@ -220,7 +226,9 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, } } /* Decide mbuf size. */ +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 21, 0, 0, 0, 0); +#endif if (tp->t_flags2 & TF2_MBUF_L_ACKS) m = m_getcl(M_NOWAIT, MT_DATA, M_ACKCMP | M_PKTHDR); else @@ -612,13 +620,19 @@ _tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) * ack will be required. */ cmp = NULL; +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 25, 0, 0, 0, 0); +#endif } else if (mv_to != NULL) { /* We are asked to move pp up */ pp = &mv_to->m_nextpkt; +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 24, 0, 0, 0, 0); } else tcp_lro_log(tp, lc, le, NULL, 26, 0, 0, 0, 0); +#else + } +#endif } /* Update "m_last_mbuf", if any. */ if (pp == &le->m_head) @@ -629,7 +643,9 @@ _tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) /* Check if any data mbufs left. */ if (le->m_head != NULL) { counter_u64_add(tcp_inp_lro_direct_queue, 1); +#ifdef TCP_BLACKBOX tcp_lro_log(tp, lc, le, NULL, 22, 1, tp->t_flags2, 0, 1); +#endif tcp_queue_pkts(tp, le); } if (should_wake) {