From nobody Tue Nov 08 18:24:59 2022 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 4N6GjR45qsz4V7T6; Tue, 8 Nov 2022 18:24:59 +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 4N6GjR2Y9lz4Km9; Tue, 8 Nov 2022 18:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667931899; 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=2ngwKWtlhFW3XsOTRdnR2xeHPHEIBZgfOxBfFx6VwGc=; b=NbyEyPEi6eg2kuGx9VdQu8npJHngHju0nXEkMuoKoQ5Ykoo8veEgOJC+pUfDsOZJaoYcZo rx9U03A3qsazcND/y+mx9KDHkYM2Fh1eU5V5PMpDq0nudTSYM7GmGq7oMdVsidhf9l2spY TZGdJ2M47ai4EF6jpyLUUw1hI6BFkV5eLcTliOv4Zm9yA2NgDRPiqmNKwwmrISFBfj8lGH UKMGr1oshVOgMhkTxmTOoAz1W/fDbTDlMEpWirjqyjnFjdg81kiAPkyXJn3uSexzEGfBxc KRL/gPk5xsTnYm/l80/Pduf7z1trx3TFJLZUC8tuABJHKSbfFfz1tquTOwtMeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667931899; 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=2ngwKWtlhFW3XsOTRdnR2xeHPHEIBZgfOxBfFx6VwGc=; b=QdOpFfV3IwQQiR/SwKr7rs4Uab/TpvKSl0HYFe+Ix6zbSWb94m4n8JEG7LbvkCjJLwPvmR eR32ldQZLGMmN+xw3vyu8QR7YJGN8uIXbuEIIZGT9uvVEjZO2iMSwLyNzLGCuk6utvVeyM Zc/W/cp8eCaXe9Opf0dwjOVVZyoK4lck8Dvdi0/YLvx6SzIIYOv+KTPlgG6WDYuPq9xwDX Wd2AMzveLxy7V2qsfCd+LH4KC5nTO4uZ691DBVUA2V3bEm67JcuVgiek2aHJCpGTQefXRg 15J5QMk7sqz8dgIp0ykemYnyYQSZRMz8VX4tkaJH1eKXOuRwwP8dAejSlajNAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667931899; a=rsa-sha256; cv=none; b=lpLiO1Cuj9b+EL64B7L0pXUIGnIVqoSKOqbJOsvA6iRkCsB15OD6yVZgAmjEuQr1cWNKgo Y/Nw/m3llCc4Cg/OuoqJz9ETd8+k+fd0EH0ec07JqFHDKXsabDvDMIr+wVRpwhEeZKqugu ARK7SMpzy9era1F92WrlbcKcTqCGnxS9nOXcTGCYGWZr4JqD8k2cO0elBa35D5czGnXKAQ ejl68g1rtv3sssWdS7CDewUSCC3DXQaStA0mObw1QRn1MrKfXtMuI6SS7vF6kbq0TB5+Rl ewom3LkzHpfyOBgm1U+pw198sp/eIGTXfhisYtBVj5SLvvvYJsDKBIjA/nMplA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N6GjR1gFgzsK0; Tue, 8 Nov 2022 18:24:59 +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 2A8IOxAm043463; Tue, 8 Nov 2022 18:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A8IOxXB043462; Tue, 8 Nov 2022 18:24:59 GMT (envelope-from git) Date: Tue, 8 Nov 2022 18:24:59 GMT Message-Id: <202211081824.2A8IOxXB043462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ab0ef9455f73 - main - hpts: move inp initialization from the generic inpcb code to TCP 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab0ef9455f7362aaa05f9437818dc0b963eae27a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ab0ef9455f7362aaa05f9437818dc0b963eae27a commit ab0ef9455f7362aaa05f9437818dc0b963eae27a Author: Gleb Smirnoff AuthorDate: 2022-11-08 18:24:40 +0000 Commit: Gleb Smirnoff CommitDate: 2022-11-08 18:24:40 +0000 hpts: move inp initialization from the generic inpcb code to TCP Differential revision: https://reviews.freebsd.org/D37124 --- sys/netinet/in_pcb.c | 7 ------- sys/netinet/tcp_subr.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 70aaca21a20f..2118d5f41e41 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -639,13 +639,6 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) * to be cleaned up. */ inp->inp_route.ro_flags = RT_LLE_CACHE; -#ifdef TCPHPTS - /* - * If using hpts lets drop a random number in so - * not all new connections fall on the same CPU. - */ - inp->inp_hpts_cpu = hpts_random_cpu(inp); -#endif refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */ INP_WLOCK(inp); INP_INFO_WLOCK(pcbinfo); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 76765a223b71..acd82b4e851c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2315,6 +2315,13 @@ tcp_newtcpcb(struct inpcb *inp) */ inp->inp_ip_ttl = V_ip_defttl; inp->inp_ppcb = tp; +#ifdef TCPHPTS + /* + * If using hpts lets drop a random number in so + * not all new connections fall on the same CPU. + */ + inp->inp_hpts_cpu = hpts_random_cpu(inp); +#endif #ifdef TCPPCAP /* * Init the TCP PCAP queues.