From nobody Tue Feb 08 02:23:46 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 CF6B719A82B8; Tue, 8 Feb 2022 02:23:46 +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 4Jt6JL5NvRz4vkN; Tue, 8 Feb 2022 02:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644287026; 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=aCEn7CcS7lS79JS4kFUKPxpWFuClWylLt0irz4/qpdw=; b=wO3XF/2AKuFr3xzY/EtYwT2+ik/2ABYrBWmp/c5CbViSZSuKMWNjdwFSZK7dz8j5OJ+FEb Vk/aSjUhUeM09qEguKDHgPQg9yMuPPE+Y/Tc2xcx1tvPFZz1lqu8uDJUwI5PMbWMi8EirR KJ9HZ2iPKCgQSdzDGUbJHNmDFFjtASpBEUA64afa63g6yr9+CijeJOqN/j1b1ErvfL68ri 47QRJ0YYrCWC6Tgecosf2t6d9si5VvLQ55Q6wUVT96Z2UjYpvSfHs68yADK0dsFGos8yzT mc5ieglWIvFWEMj5x1E6cIBq30TmCC4IbmNb70PZ1SIWWp1QUBXzeoo7Qs/VJQ== 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 95CC3115F9; Tue, 8 Feb 2022 02:23:46 +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 2182Nk35092318; Tue, 8 Feb 2022 02:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2182NkEH092317; Tue, 8 Feb 2022 02:23:46 GMT (envelope-from git) Date: Tue, 8 Feb 2022 02:23:46 GMT Message-Id: <202202080223.2182NkEH092317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 47ded797ce96 - main - netinet: simplify RSS ifdef statements 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47ded797ce9620f055f005e9dccfcd03613b1804 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644287026; 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=aCEn7CcS7lS79JS4kFUKPxpWFuClWylLt0irz4/qpdw=; b=CikK0o1lv870KJg6C7bcw1pTuFvp8RNXY1SWapC09Y2PyJI+U1c8Or6CI+1M3741JvP2JU mdbxzCE1xKf5CzGR448NqQgbCYfBIKu0EryoTl0TK29x6STaRR97rRnMp4f7VFlSQcf3in wAE/hGDNO5zKhlDGHnOEbJuTo37ss3LmXPPgBGFUtmgwQyf1EBEKWIrSlRURCvjcFB2tFE YwkSJf9TikMnGJekwjGphtiiElw8A+mg5AqsK2GI1o8HKDeDNjsO3aOEz5jz7991Yh5UuI wcUJ3HcVNtPd7ezEPKUlgtTSZ4+lECDYmmrcFxVnJn8NT4P1jR8o7Aq9rP8qZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644287026; a=rsa-sha256; cv=none; b=bWsNyUUeLgPAA3oto8Eb2Cmxtrk3u7XTZ0XLvmrcj5PsbFS8NIKqs92XIYiWvX1CAiDWgk x2ZMSYj8wuWJ8RZEOjTLDoJk0qINt+qnwirspyHnA/IY0q6fNjeDaU4MLtnSkT2rDlM8pH 5+hHN02dUQLWFVleWTmM87V2bEEFgz9rjWHVzhbvMqWvwvQqUkcsHAnGsItqPuzIGnBM3F if1oby6ckhuL713VguPKZP5evSpT9kE+oW0waHfEo/4KKG7FWxNrF7EDNJm5ggxt0qj1MN sWRkYpvvW8Ocaktqnx5Ia+5/koAM0zCehBfA+qz/LUoyf6+AuBv1DKqnxn2k4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=47ded797ce9620f055f005e9dccfcd03613b1804 commit 47ded797ce9620f055f005e9dccfcd03613b1804 Author: Franco Fichtner AuthorDate: 2022-02-08 02:22:03 +0000 Commit: Kevin Bowling CommitDate: 2022-02-08 02:22:03 +0000 netinet: simplify RSS ifdef statements Approved by: transport (rrs) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31583 --- 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 40747a238918..456abe53723a 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1014,7 +1014,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 @@ -1040,7 +1040,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 @@ -1063,7 +1063,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 a3cb16869dc9..8594ad3a65fa 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); } }