From nobody Wed Apr 17 13:55:56 2024 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 4VKMrD4DJVz5GxWr; Wed, 17 Apr 2024 13:55:56 +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 4VKMrD3jMbz4rgN; Wed, 17 Apr 2024 13:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713362156; 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=M59i3vkvvBGaMvBFOtuj5Gp6qrU5zQJOkWIUQd6UrcE=; b=HIGJJpkC1l9lDhQBr+rXSTT10Qv/lsB4MvaJUt9DU4VMVL0XxL0FpGXkMNb/gv85adBGYO XM5SSyMUtSb/8ZskfUHKiEByT2sDHbcBd+3JTuyNLE6nkvqg5nYkymaREUyuJZAjFGOv/Q GErQYk45zhlgtWsNn7QJt7DnL4wdIHfx0QHm/+F2zQosChfbsyltrYP6ZpghKx49m/tW07 tDDVWXF+ZU7AouDp9OAB+G+JxporLanWZPC8xVj8Ys09UumQDcMQ8ptdwQaLPXVEPIyywl HipyipCweECzX0Te2wwgobX9Y/zTN/DjoBe30M4Ae7WdBkmmJNgHStTKSJiAxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713362156; a=rsa-sha256; cv=none; b=te851774KxUjwGJbBy5GDT+v2hLEfpAG7nwKPMrS4dwIguovnNJE7L0dRZfG9kso+V7Sf5 05t2ausLVoG3E79uDftAbfVJqUjMh9qeqbV7dDPpfOrl6nunWiKtewiuJVQQd6oV4JQiur K9q6xwDkmzcQw1Qgz8aUnvpl6GTl5HsxNQKfH6veMUdo0LXlr8s7p2iokG974X9kWCYF8t 7x0Kk1BKLLrNEjzkJIhBxg/X7oGV/ofDwFc+FZ+PLvs9XrlcirRLrxYkePpDouiLI6v8Em 1X+GN/2P3eh11m4MzDMk0nCVl7vGRscOfbeiUjAJi8OfFN5DGwj2cM5EZslAuQ== 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=1713362156; 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=M59i3vkvvBGaMvBFOtuj5Gp6qrU5zQJOkWIUQd6UrcE=; b=Y3RLaJEkKY7ktKUNrsZHN5WXy7bIWEBSF0SawpG4f+4x293l/Mm+Kjsb+w84kOF865dIoo zJ2lj1ZL+VsjmcIdpNOOS9yWrGev42s2r2BHuwGgxPEQqgm+S7nkPX2V53yxrw250WHA3R 9FFqetFSXCoJmkEk2woO4EHgMAMW97y9QYAAlpheimvfwM+t62mKnsrR2Ja76qnxRzlBuH eL9OBiQy8/KtU/KqZDTFcrS+LHNtX0IFrt5W1jtkejvcQAlu0nndIZPuNa3/kUAY94xs13 NsTStWjpPptCIx95keubQQ5rlb0el5IGPshQ+7EZRyb5FziMgzQHmmXWCbe/Og== 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 4VKMrD3JkXzTqp; Wed, 17 Apr 2024 13:55:56 +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 43HDtuPD037598; Wed, 17 Apr 2024 13:55:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43HDtulF037595; Wed, 17 Apr 2024 13:55:56 GMT (envelope-from git) Date: Wed, 17 Apr 2024 13:55:56 GMT Message-Id: <202404171355.43HDtulF037595@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: 6572d12cfc67 - stable/14 - tcp bblog: cleanup 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6572d12cfc67632127576c9e4ce16d7d433f122d Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6572d12cfc67632127576c9e4ce16d7d433f122d commit 6572d12cfc67632127576c9e4ce16d7d433f122d Author: Michael Tuexen AuthorDate: 2024-04-05 15:36:40 +0000 Commit: Michael Tuexen CommitDate: 2024-04-17 13:55:27 +0000 tcp bblog: cleanup Remove redundant checks and improve error checking. Reported by: Coverity Scan CID: 1523780 Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44616 (cherry picked from commit 60bc195745b8c1e1896c535a491906cdf11fe057) --- 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 1f5b7cf9b54f..79f96bab1345 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -418,7 +418,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 @@ -428,11 +428,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; } }