From nobody Fri Sep 18 22:02:22 2026 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 4hmmnY1pmkz6t2pQ for ; Fri, 18 Sep 2026 22:02:25 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hmmnX2PQDz500J for ; Fri, 18 Sep 2026 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789768944; 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=OB9S9SWOme5wxdrh97JEXm6/I3y5BkVuU68+dLuYTHs=; b=ijKeP8N1hON/0DImPj8YJHFlNTYz1uzOzT+B+oY0T+hYYnYmzIvYRfa8o3+gScfbVdPqip y96IZjHbbSkVdfbtPVXkSKZ6zXz0ud19+KQIdQbOulEeGwXvEoQToCTQ1ihqQcyVHA2VjQ CL0LZ5oGerpkM0OwDfIArBEf2PSK86B42ncuE8KHEDnQg0NCwBYbzqAfxzh9Ldtyd8yT4H MCwSyNa1+ToKC6OZU2jCfI7T2G6YwrcISZiCxkod1cLw1Qbti1VLcH4rRcM+ZTNxU+jasF qnZ0XT1MA5StmLUdn9g9STnHjBjvAV+6QKYHBw5bzIS9taRP6kn6ZZpz7mOx0w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789768944; b=ERQqiqMCqarcSod4x+o25pRLE4f74hGJUZSXywI9iJaXBVD2SG8mc8gVsS5guQqnP9qqwO whuI8OWKBNOFPJLBUpH1LwKiK2efzWvA2ZkSMwAzYBHjhfBIvnjP68KttKVZbKklxLBI2b DMSUT3WVusJFX6LFKd4DroPYtxR0BB2XkiJinrYe5X9zoOOR/XuVc+/WOADvvOuagLoRJ5 nSJn+fRZKqikqU/o+M7UmUj39NKx/o2abIp+EwHTWb2+S5F08dZAH8+cS9IALUfnc15OoY dwcSwYTwWfc4tnQBjYuSzOSJkvvxDcorRTFJAosz5K//W4TbBCP3/o1E+IrH6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789768944; 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=OB9S9SWOme5wxdrh97JEXm6/I3y5BkVuU68+dLuYTHs=; b=Bt5AAgJ4aRda6j3Zwo+8z+zSY2pyWmo52dL0NPoBekhwDhx6E88BZEdNEoY441Yv1AaIlH HH/fggOP2g6ag10BrB9+xlHihvOUZNsFJcMvLunpwTRgAp8Mok2X+wM9XaUOuZglBCghnF ze0H8OLG0hEVQFiCqwicYQK8wsEPQvYKkwX+/AUemiz+4cmsomeQn86jU/n45KHPmxO7qr wDS19aASy4j1HGIOLTDfZaPhdFi7XILzfmL2QfyVHLlnaPXnUBQylYoqlaeS8CofbOb1hq edib5bcvi5sHns0ewwbeyNJdaKRZ2O+rk1YLRYLiMvZa1qmpGj3rID4DDz2TFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hmmnV4jHwzfLP for ; Fri, 18 Sep 2026 22:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f71b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 22:02:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 597798a0e5ff - main - tcp: use sparse initializer for host cache metrics 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 597798a0e5ffd425e67695ab753f8426f59c3a74 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 22:02:22 +0000 Message-Id: <6aadb4ee.1f71b.3dcbbbcf@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=597798a0e5ffd425e67695ab753f8426f59c3a74 commit 597798a0e5ffd425e67695ab753f8426f59c3a74 Author: Gleb Smirnoff AuthorDate: 2026-09-18 21:58:39 +0000 Commit: Gleb Smirnoff CommitDate: 2026-09-18 21:58:39 +0000 tcp: use sparse initializer for host cache metrics Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D59453 --- sys/netinet/tcp_subr.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6d3f6a88a1c9..1be803ed443f 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2479,10 +2479,8 @@ tcp_discardcb(struct tcpcb *tp) * say srtt etc into the general one used by other stacks. */ if (tp->t_rttupdated >= 4) { - struct tcp_hc_metrics metrics; uint32_t ssthresh; - bzero(&metrics, sizeof(metrics)); /* * Update the ssthresh always when the conditions below * are satisfied. This gives us better new start value @@ -2510,15 +2508,14 @@ tcp_discardcb(struct tcpcb *tp) ); } else ssthresh = 0; - metrics.hc_ssthresh = ssthresh; - - metrics.hc_rtt = tp->t_srtt; - metrics.hc_rttvar = tp->t_rttvar; - metrics.hc_cwnd = tp->snd_cwnd; - metrics.hc_sendpipe = so->so_snd.sb_hiwat; - metrics.hc_recvpipe = so->so_rcv.sb_hiwat; - - tcp_hc_update(&inp->inp_inc, &metrics); + tcp_hc_update(&inp->inp_inc, &(struct tcp_hc_metrics){ + .hc_ssthresh = ssthresh, + .hc_rtt = tp->t_srtt, + .hc_rttvar = tp->t_rttvar, + .hc_cwnd = tp->snd_cwnd, + .hc_sendpipe = so->so_snd.sb_hiwat, + .hc_recvpipe = so->so_rcv.sb_hiwat, + }); } refcount_release(&tp->t_fb->tfb_refcnt);