From nobody Tue Feb 28 20:16:23 2023 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 4PR7tH2dfmz3tsbW; Tue, 28 Feb 2023 20:16:23 +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 4PR7tH1zH6z3vgK; Tue, 28 Feb 2023 20:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677615383; 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=FxNr3l2dAhu7p5U2LIXimXfc8WvWbT9YYUH9JMdJe5I=; b=OloD25yC/7o0P7T9v8VAIHul2y0Fya69pDdIi8/R1It+uTmgb/+F4+tSSyMroCxEvMvcTU 4OyIR2Jl/LZKPAALvfl9eN1P09n0PJsByE95WEjwEivBgzQqDqrOxMOxCtj+FPpOe+hY9G +b9e5eqQ0Kq3wMafOpdN1Yqj4LRvHgB4gJ8mOIuHPGF4x/qyEECzOS2HDLtaUm12l7UAms MC9O6zyCXDkTxhddgOiRrz5D282YsuUn9E9gDD2VtGi4Rh1P30fcV1//6Oh+/aWWFfZkKi OSqeXshnuUGykfIBTw1/1ikbP1d/r7tQQk7+KR3NvDPRoWhmeyrtlfKr3eSO3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677615383; 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=FxNr3l2dAhu7p5U2LIXimXfc8WvWbT9YYUH9JMdJe5I=; b=EHGxzdKzrzSV0j2ym9NaORakc/W+CL+CJCSOcZXFwgS/GHiD9Y82u4O+jQO9DnC3VehSqd Ys7Jezgm6t1vT0kGoWbgVAKvorOVFPvIqFF2fCchR8ow8GgMBHgxuKrGq88cXvyO4r9iPN kK2Q9raJ8rStZm+quon0gFvH5/uvIsA5YADszjPtwH6vIG1y767mKpkSDfFaBlHqMoZv8K lKnpTtv699vDFVBvg3wkb75DzwH/Cx/v3CkL/0JuTC5QbtNMF+or7qs48cg6Rb8Xux2jka 69qisQu8S7lWA6z/3ZLByjokWuRUp53dZcKpKe/D1LFmPID1eDePpsDgZlDcYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677615383; a=rsa-sha256; cv=none; b=b4hXBxb55U9HRRlM5qxV24qbM3kYuTw72cwxMQmAO+RLnJ9yjJ3elTtBOlG6giRf+hgzEI TagfTLoWGMmNTlLLwl9yxe9JruXNXjvB5+zpvvqcHZOF3jTtsCUS2unKC08d4oIoWugOP8 dDV/2nM48ZtUnwXxzikbfRV1nGrCL8cOacujJsMs4cFkCra0eydMXNYTwspJCmaluV04VM Z8JwlRqx7G4ollIgKejfjNgJkue32BrtyXxwYq0nKiJuAk+am6DFBJjJJKfri4ZPj3ow44 6RiIdhqzKDIQj5BYPnTQDun4gRB2IAl5IXw1nbDtpgfKBj2/K+a2U8FIFNs8Cg== 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 4PR7tH138xz1LMr; Tue, 28 Feb 2023 20:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31SKGN4e097614; Tue, 28 Feb 2023 20:16:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31SKGNog097613; Tue, 28 Feb 2023 20:16:23 GMT (envelope-from git) Date: Tue, 28 Feb 2023 20:16:23 GMT Message-Id: <202302282016.31SKGNog097613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 399a5655e6ed - main - tcp: Make TCP PCAP buffer properly configurable. 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 399a5655e6edf69a63f1c37e66fdad19dcfdb5cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=399a5655e6edf69a63f1c37e66fdad19dcfdb5cf commit 399a5655e6edf69a63f1c37e66fdad19dcfdb5cf Author: Richard Scheffenegger AuthorDate: 2023-02-28 18:57:30 +0000 Commit: Richard Scheffenegger CommitDate: 2023-02-28 19:12:11 +0000 tcp: Make TCP PCAP buffer properly configurable. Reviewed By: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D38824 --- sys/netinet/tcp_usrreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index f17285664ce5..d0a929c57c7b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2320,7 +2320,8 @@ unlock_and_done: INP_WLOCK_RECHECK(inp); if (optval >= 0) - tcp_pcap_set_sock_max(TCP_PCAP_OUT ? + tcp_pcap_set_sock_max( + (sopt->sopt_name == TCP_PCAP_OUT) ? &(tp->t_outpkts) : &(tp->t_inpkts), optval); else @@ -2561,7 +2562,8 @@ unhold: #ifdef TCPPCAP case TCP_PCAP_OUT: case TCP_PCAP_IN: - optval = tcp_pcap_get_sock_max(TCP_PCAP_OUT ? + optval = tcp_pcap_get_sock_max( + (sopt->sopt_name == TCP_PCAP_OUT) ? &(tp->t_outpkts) : &(tp->t_inpkts)); INP_WUNLOCK(inp); error = sooptcopyout(sopt, &optval, sizeof optval);