From nobody Thu Mar 03 16:08:03 2022 X-Original-To: dev-commits-src-branches@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 B7A7719FE5E1; Thu, 3 Mar 2022 16:08:03 +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 4K8bVq4nqnz3wDt; Thu, 3 Mar 2022 16:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646323683; 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=FunyYotmKgohJzMRWwdb8uTiAkvDW2XTz6NNxjKHWvI=; b=qPSY51vKL1CX6Ryf3Y8T8BXz41dab7WE53nrJ+Z7wn70H07IL/NZsf7rhvuT/0sejeYjOJ qlcdIjhcp3UfumNngoiS8PGYnnpb2I8sQtd9j2sQz3wIJSdAbWWQFz5eF/KWrh6oT6Q9wZ W/J61jeQOCcO+Ul8khgmMu3dpot0HAGKueRRc3ptvlONISip+uj0jHZWQaXosYWFGGLuA/ zPhOuz2aE3oBIfWP/f2RYTCsY12kK7pVH1iHPLF7v+0uL7nn2gzJeka+4fWMsG4/XZa344 i8xWVOb3YWx48FpdX/4HLXn1ehk6REewc5nA+8wB47Ug2KGvc90VNE358RaKyg== 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 8403D1AF02; Thu, 3 Mar 2022 16:08:03 +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 223G83Q3033542; Thu, 3 Mar 2022 16:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 223G83HJ033541; Thu, 3 Mar 2022 16:08:03 GMT (envelope-from git) Date: Thu, 3 Mar 2022 16:08:03 GMT Message-Id: <202203031608.223G83HJ033541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d3e338662f25 - stable/13 - netinet: simplify RSS ifdef statements List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3e338662f25ced875116959cc9e48dd7b66b6f2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646323683; 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=FunyYotmKgohJzMRWwdb8uTiAkvDW2XTz6NNxjKHWvI=; b=KoI59HJRySiuIyvwEJwMM95KaMCFghFAFFWItLQtDWiYUhrMqRX43M81XIlYTi7+wFdjKG Kguhmpwrc+RuQSCeZpbhVSX9PE2g1e4y1vEl7Q7z++gYkXyJEe0gIeKbjGvb8RcxRQ7Le1 HCJkFXmaCi/swZRbGs5VQj89xemaKBz5opdTye1YxZ2dDhmtpsSAm7UpUDLr9lEtvWRHTR wrT/0ws8nzw1tNH08PZgeoA8LXRdEBJi2CPJw9B7bAAkXge4IdAVQoytUg7DDdY3tq9lOR Gl8E9dKrqvdIdVc4WcblhXbdA7qQlZtvZVha7fYa3nqT2S3+GWFj4Z70+LZ9Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646323683; a=rsa-sha256; cv=none; b=KVzMsAnZJMVpi2iUdsj0sgbRqrnhMoW83LaxjMDb+LTuS+cWDixrAWRILj/FTv+ZNcsIcT lLhIxAW6ELkKKmzfU1yI9Qbm4gKcjxAu9rORVoKfOTs9L2C3EWsjz4hJp75s/fDgebCvOd RYkiGgf8z/vBv3iFhqaBADUk7wS5+sB1gwU4lcE7nrUlhivbkRLES6aA1CvBaiGZUkQHN+ Sc02eKPEjJpnJLdMMhMBKXSDvlK6Eie6AAAWZoVh2K0QH53/laXm8G4SkWW1Gndg51U6jv TISHJU2kCbhvYiK5xBI3JHmMWPrFC4EA5xGN61t1+tdAoG/m814+PRXp7Cm6jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d3e338662f25ced875116959cc9e48dd7b66b6f2 commit d3e338662f25ced875116959cc9e48dd7b66b6f2 Author: Franco Fichtner AuthorDate: 2022-02-08 02:22:03 +0000 Commit: Kevin Bowling CommitDate: 2022-03-03 15:56:22 +0000 netinet: simplify RSS ifdef statements Approved by: transport (rrs) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31583 (cherry picked from commit 47ded797ce9620f055f005e9dccfcd03613b1804) --- sys/netinet/tcp_hpts.c | 5 ++--- sys/netinet/tcp_timer.c | 12 +++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 9ec092f703ec..d18c9db358d2 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1165,7 +1165,7 @@ static uint16_t hpts_cpuid(struct inpcb *inp, int *failed) { u_int cpuid; -#if !defined(RSS) && defined(NUMA) +#ifdef NUMA struct hpts_domain_info *di; #endif @@ -1197,7 +1197,7 @@ hpts_cpuid(struct inpcb *inp, int *failed) return (hpts_random_cpu(inp)); else return (cpuid); -#else +#endif /* * We don't have a flowid -> cpuid mapping, so cheat and just map * unknown cpuids to curcpu. Not the best, but apparently better @@ -1220,7 +1220,6 @@ hpts_cpuid(struct inpcb *inp, int *failed) cpuid = inp->inp_flowid % mp_ncpus; counter_u64_add(cpu_uses_flowid, 1); return (cpuid); -#endif } static void diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 139e32172531..96b95ab1c15f 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -210,17 +210,14 @@ inp_to_cpuid(struct inpcb *inp) { u_int cpuid; -#ifdef RSS if (per_cpu_timers) { +#ifdef RSS cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype); if (cpuid == NETISR_CPUID_NONE) return (curcpu); /* XXX */ else return (cpuid); - } -#else - /* Legacy, pre-RSS behaviour */ - if (per_cpu_timers) { +#endif /* * We don't have a flowid -> cpuid mapping, so cheat and * just map unknown cpuids to curcpu. Not the best, but @@ -230,10 +227,7 @@ inp_to_cpuid(struct inpcb *inp) if (! CPU_ABSENT(cpuid)) return (cpuid); return (curcpu); - } -#endif - /* Default for RSS and non-RSS - cpuid 0 */ - else { + } else { return (0); } }