From nobody Sun Nov 06 12:53:06 2022 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 4N4vRQ36kPz4h7Bs; Sun, 6 Nov 2022 12:53:06 +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 4N4vRQ2WZJz3C7L; Sun, 6 Nov 2022 12:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667739186; 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=E0uaj204E/s3o4vx4OmzErSVFiyj7NLzOh/inpoVD/o=; b=oSgZeQ0746pNDOJldR1h1xMMvfRsXRM7M1u6f/QNDot8RIfkwy6IWtL/aHt8Slj6z7sMgU B7WoKuWmpX5bJ1FMF3Qtyo8uBmqFAeMdPlrgrEM8wZi7myBtU/0c8gIAYhvq4ZvxN94eB5 kX+MUxtMsVBcQ3ZQxs0UlnwG2wFza33eDeKyuA9aWDZdZL95R8OJJiYVtIvJD5IoAG+Db0 Fpfj3eCDA1BuR6Y3l0DT6CxKwnKLfDY/FB1nyS67LTxfZwCl0gBwS4dRecfsqDaTslnkqR XHgK/cdwzSGEtVcsUfhYoSI7bBe3e2fsj2B42TNItJyrKzSGIIFoMRjwOXspnQ== 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 4N4vRQ1YHszMXD; Sun, 6 Nov 2022 12:53:06 +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 2A6Cr6O9054782; Sun, 6 Nov 2022 12:53:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A6Cr6XZ054781; Sun, 6 Nov 2022 12:53:06 GMT (envelope-from git) Date: Sun, 6 Nov 2022 12:53:06 GMT Message-Id: <202211061253.2A6Cr6XZ054781@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: 37bf391d3cee - main - tcp: make tcp_packets_this_ack() only visible in kernel scope 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 37bf391d3cee813e061b7f653050895531834c43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667739186; 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=E0uaj204E/s3o4vx4OmzErSVFiyj7NLzOh/inpoVD/o=; b=ZgFfOmpjZ7wuo7IIdOB3EXDO4n0sLuTno9UUz+8Kn6r/AjnDxbTRZIBss6uWOzTD9I+8pS yzO1gkypWwb1MrCvDkiuO6Dc973gaFI017CokzuAVTr/kfeyM3lHzh8qeNfXrcqWABEFuC F2Qk+WY5qR6zss+RjICGxOFGpLJdEOzed26CzeO2eX2e+e9hxWe55NIUA7dczql9CdXH3z QAdzIl+ChSMlJmjMzASxMVaNOcwfWYTfhJYHIFF5xL4HSXE651HpG3NzerBXpwmcsgPZPf F3NqfJuhFMYih8nHy4X8WN/H9d4n6jlEWVj+vfUQStNccVcowtv07a8c7Y++DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667739186; a=rsa-sha256; cv=none; b=gqEGWLZ/WrTaQSziHjML55hzSpnuhtdffkVZzo993uB/JG9wZZc4Rbv8Sa6YQ87Z2Mf/hU WTQcIvjXEIR5JOrrI0df5gxMAdEGiFQ3So/x0JMxXdbR+2GfnZ9JdPUioG6iP20VeoL9JJ yIuqUMf33Y7DxZ/lRWSwz8pS1zZ/u8pXSya6+olLdgmfisdKlbrKlo/W7AvywULcm2Z/i5 Kjv/0+I1PndtRy+QxOO5v4uwF0iQGPvoItLIukanhVFRJ/zm1vTizPpMxHLkaAhr5FsgR9 7LB97DjoSilYE9QHjY2Oad9de08umjoZRWz4H3f4xsjADn7ePTp0eZ6PnJImGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=37bf391d3cee813e061b7f653050895531834c43 commit 37bf391d3cee813e061b7f653050895531834c43 Author: Richard Scheffenegger AuthorDate: 2022-11-06 12:50:13 +0000 Commit: Richard Scheffenegger CommitDate: 2022-11-06 12:51:57 +0000 tcp: make tcp_packets_this_ack() only visible in kernel scope --- sys/netinet/tcp_var.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 01deeaad58cf..3bcba227d5da 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -490,6 +490,13 @@ tcp_unlock_or_drop(struct tcpcb *tp, int tcp_output_retval) return (tcp_output_retval); } #endif /* _NETINET_IN_PCB_H_ */ + +static int inline +tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) +{ + return ((ack - tp->snd_una) / tp->t_maxseg + + ((((ack - tp->snd_una) % tp->t_maxseg) != 0) ? 1 : 0)); +} #endif /* _KERNEL */ /* @@ -551,12 +558,6 @@ tcp_unlock_or_drop(struct tcpcb *tp, int tcp_output_retval) #endif #define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una) -static int inline -tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) -{ - return ((ack - tp->snd_una) / tp->t_maxseg + - ((((ack - tp->snd_una) % tp->t_maxseg) != 0) ? 1 : 0)); -} /* * Flags for the t_oobflags field.