From nobody Tue Jun 10 16:36:28 2025 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 4bGvZ50kZfz5xvBP; Tue, 10 Jun 2025 16:36:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bGvZ500mYz3jxZ; Tue, 10 Jun 2025 16:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749573389; 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=kUvydJL4t6h2xr9OlE6qRw2R945C7xYFfnlJxBJHwe0=; b=RzKUoHo6E6j3KiZv7g0jA8Aec7kRXELGGoVHX6sHC/ybFZxzSyuJHuIl9FzjFj3GwqVpUn v9KDILsvmyiR5Zi8G+sr3qC9X8amQgs3f2pGCXfcBfo1Z4jhVHCPWKblQ8ceu3H3RnB0LT 25M5eqsNXtDZZWe0m1hS+0mnFIAyWsQQ/YX0jNF3em2LF9YuNuDBMygxQPMDrRLiTQT0Ou MPf66Ip6ZL+LwW5MH0nm078ln4oktU1yCgnRURb2hPuT9THKNcXEY7AYSkwxC7HKPRZmSH m4QjOygJSPoZQo+a8/CW/ZfnxJUt29qOQFlfZf+J/fjpW9xwgyIyuu8V0aP3Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749573389; 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=kUvydJL4t6h2xr9OlE6qRw2R945C7xYFfnlJxBJHwe0=; b=s+lpYYAPGj/fkeyF89hw8IJO5ndJP2XMRhbfqH19WA1QJ3K2vQvum16xZlCPycavrDkUuR 3317SPUNEXBl+Fdmgy4466XteZ5G/18hAcGTIXs09Ishc/S0nJpH4z69xg8+dOQCfOek36 6BVFILpuy0CT/NhGelswgswpFuLHpGiLY5UIFMYtJOUiYywgVzgq4gpCncUBlQU5VkQyYD MIVN2E/t8qGwo2XFOFrMOnw8/z/KAezH6lw87mHPRle/Aasf8v0zSLu+GtqyRP6KTcMH6z wEFVckQIvAAzly3nCPSn1NF9rXD2WGekBj/Yjv8yYzmauZMJFe+C+8GllHClrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749573389; a=rsa-sha256; cv=none; b=fV9aMoBZAoMyuqW/x4UL0HuK2XzPw2pgUFzYVh6cVlC8LIfwy1/0lF32yTKPOV+gcCyiO5 i8PB5/S4+k07hnIKSiHKvcAMN5Wabgbt2Hqzhp+6T1+Tm1WdE6MVYeozqhjqcFRRAVvgpS ptjsnhsQL4e2fYaDoLUs5DywKt0uUghCMxlJSBsTz9IMsgboBkJ43nvEFWpVZRzWSn9HyG zfwUa3rEWWZHQFLeV8wyziqPv/wHGtPwZjnDXeskYDtZMn83KU6GojRQHfzShokVwRXIox YXUdSRF7tQtPBBIjNGYo3jxDFMwh9ssBewZE0fQNqU7U80inr+j9lfejZq0ZfQ== 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 4bGvZ46V1szpZH; Tue, 10 Jun 2025 16:36:28 +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 55AGaSLx090666; Tue, 10 Jun 2025 16:36:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55AGaSLp090663; Tue, 10 Jun 2025 16:36:28 GMT (envelope-from git) Date: Tue, 10 Jun 2025 16:36:28 GMT Message-Id: <202506101636.55AGaSLp090663@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: 0dc78204a7dc - main - ddb: fix handling of BBLog entries when BBLog is disabled 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 0dc78204a7dcbc51bfab4c701e1335084548bc05 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0dc78204a7dcbc51bfab4c701e1335084548bc05 commit 0dc78204a7dcbc51bfab4c701e1335084548bc05 Author: Michael Tuexen AuthorDate: 2025-06-10 16:32:39 +0000 Commit: Michael Tuexen CommitDate: 2025-06-10 16:32:39 +0000 ddb: fix handling of BBLog entries when BBLog is disabled Fixes: a62c6b0de48a ("ddb: add optional printing of BBLog entries") MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_log_buf.h | 7 +++---- sys/netinet/tcp_usrreq.c | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index eb33a9c15ebb..fef32e16b2e4 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -570,6 +570,9 @@ void tcp_log_flowend(struct tcpcb *tp); void tcp_log_sendfile(struct socket *so, off_t offset, size_t nbytes, int flags); int tcp_log_apply_ratio(struct tcpcb *tp, int ratio); +#ifdef DDB +void db_print_bblog_entries(struct tcp_log_stailq *log_entries, int indent); +#endif #else /* !TCP_BLACKBOX */ #define tcp_log_verbose (false) @@ -585,9 +588,5 @@ tcp_log_event(struct tcpcb *tp, struct tcphdr *th, struct sockbuf *rxbuf, } #endif /* TCP_BLACKBOX */ -#ifdef DDB -void db_print_bblog_entries(struct tcp_log_stailq *log_entries, int indent); -#endif - #endif /* _KERNEL */ #endif /* __tcp_log_buf_h__ */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 1eee45e3c2ac..cd273803dacf 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -3210,7 +3210,12 @@ db_print_tcpcb(struct tcpcb *tp, const char *name, int indent, bool show_bblog) tp->t_lognum, tp->t_loglimit, tp->t_logsn); if (show_bblog) { +#ifdef TCP_BLACKBOX db_print_bblog_entries(&tp->t_logs, indent); +#else + db_print_indent(indent); + db_printf("BBLog not supported\n"); +#endif } }