From nobody Wed Jul 19 12:50:43 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 4R5bK00j5sz4nXny; Wed, 19 Jul 2023 12:50:44 +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 4R5bJz5jTzz449T; Wed, 19 Jul 2023 12:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689771043; 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=TA4K97P0zjN6EnzrbyoqmmCR4cysOf6pH5slqYJ+PkM=; b=FzD4Bx8jg+YeIZwCxoJjkP80Ml6xPBPVbeK91tQklBhFZWFbrZflppvz9AJcxvpURKgcgr KwU2GrRAK2z/LH0T5ipwOGK1su7/dcxRDuYuPVvXljWNmqapKEMp5YkLosQoRbNBpe/thg 7GifUChWLEp3w60uOgWYaDI3qN9qJAn0k5x/NwuQA+jSB+J5MvIPm9lsYqGwwZL6QnL0OD FLX4qaGggdM2l4evHLDze7NJKRh3K6ak7RMsyMYfBpDZeU0IjMsEM2hoU0mbLsvOhsxHr+ Nzxd70RXWEWg8g0kD92x8yL8JrC2HTdwnC3LHov4pgbsAaitJ4TO3SK7+2Wp5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689771043; 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=TA4K97P0zjN6EnzrbyoqmmCR4cysOf6pH5slqYJ+PkM=; b=XjW5EZi/fxgkV9Vtx0ilPx5TM8UhofqxXKo19SSGRiVo/Gbp8GXT2dofgZWdCPVSDRcr+E rTj3cGA/KfYYCr+Eq7rOsraaY9xbh56GVhBof+KEirB5P9ltfYxJ44f4PTjU+uvD1hX7qn qnZTHSx1bRKOzYpRYZE5PRKXCqe3aI7SJL7qNDj9sdhXSAmP1J2iMjG62Ux7POMHqOXT6I Jv4ZaUZ9glRVQhju+GUzbOIlGO6ZPFXL6tYuCFVtslFS+kGXL7UfoOT2oZ9+DYGdg1fyL6 I/oiNmXYLlk7Mjis1AJeprtwdjaRuJhDLOV0Lj/uNchcdMu3O7uOT8bDrQtfrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689771043; a=rsa-sha256; cv=none; b=cJ/rha9VI1rR4NB/a+heBwQx1jqyJQCYLk+gCihUSyHsyfwvaFER80jt41jit6ujm+qBkZ Z3mTdksKgcNMuxYCDS7SQt/hATA/d4yJryjoUpCxS1k4PzvzXxPM5XN2NFI/DRI4aWsHZS JTZossjw9D1Uit5a2QM2Sx3jkO9CvZq6eqlVBuLgFo1yEV91GUGeztZISooacm66itzkFf CMhAlpwxgZQoD4GZFNUMFRfWE6UHYU91RaizIDmHPKDYqJOO5P7BuDhSXxLkq81nBHaYth FJEQFt00SLS997qD8Mm64pp2kYdro7luwAwPRLQOLk9V7gu5O9PwvHdgmTq+Lw== 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 4R5bJz4VLYznxx; Wed, 19 Jul 2023 12:50:43 +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 36JCohLW060534; Wed, 19 Jul 2023 12:50:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JCohNt060533; Wed, 19 Jul 2023 12:50:43 GMT (envelope-from git) Date: Wed, 19 Jul 2023 12:50:43 GMT Message-Id: <202307191250.36JCohNt060533@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: e4a873bf10b7 - main - tcp: improve layout of struct tcpcb 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: e4a873bf10b7cc8fa67087a7291a640d09e430f2 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a873bf10b7cc8fa67087a7291a640d09e430f2 commit e4a873bf10b7cc8fa67087a7291a640d09e430f2 Author: Michael Tuexen AuthorDate: 2023-07-19 12:47:36 +0000 Commit: Michael Tuexen CommitDate: 2023-07-19 12:47:36 +0000 tcp: improve layout of struct tcpcb Put optional fields at the end to minimize run time problems in case CC modules are build from within its directory. Reviewed by: cc, gallatin, glebius, imp Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D41059 --- sys/netinet/tcp_var.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 8e89f2aef0f2..0f57fec74865 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -442,15 +442,6 @@ struct tcpcb { const char *t_output_caller; /* Function that called tcp_output */ struct statsblob *t_stats; /* Per-connection stats */ /* Should these be a pointer to the arrays or an array? */ -#ifdef TCP_ACCOUNTING - uint64_t tcp_cnt_counters[TCP_NUM_CNT_COUNTERS]; - uint64_t tcp_proc_time[TCP_NUM_CNT_COUNTERS]; -#endif -#ifdef TCP_REQUEST_TRK - uint32_t tcp_hybrid_start; /* Num of times we started hybrid pacing */ - uint32_t tcp_hybrid_stop; /* Num of times we stopped hybrid pacing */ - uint32_t tcp_hybrid_error; /* Num of times we failed to start hybrid pacing */ -#endif uint32_t t_logsn; /* Log "serial number" */ uint32_t gput_ts; /* Time goodput measurement started */ tcp_seq gput_seq; /* Outbound measurement seq */ @@ -478,10 +469,6 @@ struct tcpcb { uint8_t t_end_info_bytes[TCP_END_BYTE_INFO]; uint64_t t_end_info; }; -#ifdef TCPPCAP - struct mbufq t_inpkts; /* List of saved input packets. */ - struct mbufq t_outpkts; /* List of saved output packets. */ -#endif struct osd t_osd; /* storage for Khelp module data */ uint8_t _t_logpoint; /* Used when a BB log points is enabled */ #ifdef TCP_REQUEST_TRK @@ -489,8 +476,19 @@ struct tcpcb { uint8_t t_tcpreq_req; /* Request count */ uint8_t t_tcpreq_open; /* Number of open range requests */ uint8_t t_tcpreq_closed; /* Number of closed range requests */ + uint32_t tcp_hybrid_start; /* Num of times we started hybrid pacing */ + uint32_t tcp_hybrid_stop; /* Num of times we stopped hybrid pacing */ + uint32_t tcp_hybrid_error; /* Num of times we failed to start hybrid pacing */ struct tcp_sendfile_track t_tcpreq_info[MAX_TCP_TRK_REQ]; #endif +#ifdef TCP_ACCOUNTING + uint64_t tcp_cnt_counters[TCP_NUM_CNT_COUNTERS]; + uint64_t tcp_proc_time[TCP_NUM_CNT_COUNTERS]; +#endif +#ifdef TCPPCAP + struct mbufq t_inpkts; /* List of saved input packets. */ + struct mbufq t_outpkts; /* List of saved output packets. */ +#endif }; #endif /* _KERNEL || _WANT_TCPCB */