From nobody Fri Apr 05 15:41:00 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 4VB2l04vfWz5Ggch; Fri, 5 Apr 2024 15:41:00 +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 4VB2l04NjZz4PdZ; Fri, 5 Apr 2024 15:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712331660; 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=6noPlW6Stu5OYDjZ7BU5moNiTWcLMkqpL96pgFLxThQ=; b=jldsnSjoVdv5Fwlt8KaKuDq9CaM5ukZhzeXDNCrlc5X3GMFjQ6d6E4k+mTliXthVg159Df +DVSNSMH45FwWIynTLEkqJOVNZZpKWNNgD9lc0AHdGjIFgFygLYstTJk4rrA3YES1QHvPR +UTXDghsFSmIcRq1MUk1J57xA685exkJSlgLb+8UJ8wDwLL8j1hmBxK5ZGaxogClmn0cmm dXbovvWKmIkMw2sViTAcUr+skxNhFF5oOddoEDqg/BDETLUsPt4t9sDZm5FbmLF/su9GJC Fo56QcivWTBowf+dkV/RrlIWtUnl1JhGIZavo5sYlKWyE3Le/yfh7+djg1t4VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712331660; a=rsa-sha256; cv=none; b=ph656tdCD4Hsm8v2aTLLIOMwhb3rsRhV31OwVL493v5CydJU4a1oW0g9D1KDC36ztavbsn Fv3LoTRq2lJdmSbvILtvBHwlAjfRmXZwLRc4k2n6wixnugdz7v3ywRIvE8S/wkhvoZipJQ wjlBsPnOYXXYfO8msacI3RsvJLDnOYWnpRSIm+t1gWKOfFl68tIibiXxnvUZPE63mVTwbb w/F+5t+JGnAdEauQyjwoj1pS9MQ5U/oXs5vTjhpyOhNDfLKC6CC/ekIZvsmaNdWKf1P5E+ hq8MNdRAc1TcvdwgD9gHQ4+FCW+xpWaYQBu6vBOgHnktHB50xdAF93aNqzwPKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712331660; 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=6noPlW6Stu5OYDjZ7BU5moNiTWcLMkqpL96pgFLxThQ=; b=AqKtLf+LMbi5Qc5H/z8EEnq9rSsuuwO3lnfY3B9JeHsNOD3UxWoFt5aM1vNUsFeGrxVDKn 7fQsLsdYxg7poKGf8zFSiGyVd0vZsHgCF4JzNcw8NF1ZhHsjcCeMSmzdbhKR8T6fcke+uo g/FzIF6mXXno+kXgSdgncdP9/Izn+03+Pa+fmoiHmHe9o3UsPr6QrdNttWs4pusHEmwKx1 t4TA1vukOrytJryTiklbRi/BgjMxMOGKA2HDZwjQsjmdhxNQnpHCy0jvlMCM7re+97zRDx 7aaAD34AyK/CMtyPIzq3nJ11Yh5UfZl406qb/DcgAXYAZYc/4VdQJOGRgUrR0g== 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 4VB2l0403Rz1503; Fri, 5 Apr 2024 15:41:00 +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 435Ff0xa021912; Fri, 5 Apr 2024 15:41:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 435Ff0xH021909; Fri, 5 Apr 2024 15:41:00 GMT (envelope-from git) Date: Fri, 5 Apr 2024 15:41:00 GMT Message-Id: <202404051541.435Ff0xH021909@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: 60bc195745b8 - main - tcp bblog: cleanup 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 60bc195745b8c1e1896c535a491906cdf11fe057 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=60bc195745b8c1e1896c535a491906cdf11fe057 commit 60bc195745b8c1e1896c535a491906cdf11fe057 Author: Michael Tuexen AuthorDate: 2024-04-05 15:36:40 +0000 Commit: Michael Tuexen CommitDate: 2024-04-05 15:36:40 +0000 tcp bblog: cleanup Remove redundant checks and improve error checking. Reported by: Coverity Scan CID: 1523780 Reviewed by: rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44616 --- sys/netinet/tcp_log_buf.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 2e91d9cbdf3c..38f66e69b093 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -421,7 +421,7 @@ static inline void tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint) { if ((ls == TCP_LOG_VIA_BBPOINTS) && - (tp->_t_logstate <= TCP_LOG_STATE_OFF)){ + (tp->_t_logstate == TCP_LOG_STATE_OFF)){ /* * We don't allow a BBPOINTS set to override * other types of BB logging set by other means such @@ -431,11 +431,9 @@ tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint) */ tp->_t_logpoint = bbpoint; tp->_t_logstate = ls; - } else if (ls != TCP_LOG_VIA_BBPOINTS) { - tp->_t_logpoint = 0; - if ((ls >= TCP_LOG_STATE_OFF) && - (ls < TCP_LOG_VIA_BBPOINTS)) - tp->_t_logstate = ls; + } else if (ls < TCP_LOG_VIA_BBPOINTS) { + tp->_t_logpoint = TCP_BBPOINT_NONE; + tp->_t_logstate = ls; } }