From patchwork Thu Apr 27 13:45:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tenart X-Patchwork-Id: 13225500 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5127C77B73 for ; Thu, 27 Apr 2023 13:45:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243284AbjD0Npj (ORCPT ); Thu, 27 Apr 2023 09:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243389AbjD0Nph (ORCPT ); Thu, 27 Apr 2023 09:45:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C9F2709 for ; Thu, 27 Apr 2023 06:45:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 15E5561444 for ; Thu, 27 Apr 2023 13:45:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D126C433D2; Thu, 27 Apr 2023 13:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682603133; bh=D8Vhv+XsJTd04zdSnRJn/vpNhr6R8F+gq2dhD0U+Z+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uYUizYkGivNa1Wujjmt2wbMrLA0KuUndiJVFHyUJFC+v2YVYa34h2Ar0oAFwWvXIb Qy+ZUiJnOhAcPA0KbOQwtJfxghC96Qhvecp+TJbAQp3HiJ7Pexv73zgBv76zLq58G+ n8A22lmqxcuFp/YxuPFtooADcitVmVzLMolh16FaHpIm4VmpDQN8FOdxfJ26zlxaWF 2mya5JuOu+Un5X1bkve0oKVFpswT1F8kC6ZfKitRV1KtQGpGlet/SQUVKa+QGWtdox is2uhfBEPuLAVpOrjm32G4pgtLkYjlrFWOAP6TAkbs2J63ODouZ3QrpGrpxH+X1uu1 IkJ4WCRc/7v3Q== From: Antoine Tenart To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com Cc: Antoine Tenart , netdev@vger.kernel.org Subject: [PATCH net-next 1/4] net: tcp: make the txhash available in TIME_WAIT sockets for IPv4 too Date: Thu, 27 Apr 2023 15:45:24 +0200 Message-Id: <20230427134527.18127-2-atenart@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230427134527.18127-1-atenart@kernel.org> References: <20230427134527.18127-1-atenart@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit c67b85558ff2 ("ipv6: tcp: send consistent autoflowlabel in TIME_WAIT state") made the socket txhash also available in TIME_WAIT sockets but for IPv6 only. Make it available for IPv4 too as we'll use it in later commits. Signed-off-by: Antoine Tenart --- net/ipv4/tcp_minisocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index dac0d62120e6..04fc328727e6 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -303,6 +303,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) tcptw->tw_ts_offset = tp->tsoffset; tcptw->tw_last_oow_ack_time = 0; tcptw->tw_tx_delay = tp->tcp_tx_delay; + tw->tw_txhash = sk->sk_txhash; #if IS_ENABLED(CONFIG_IPV6) if (tw->tw_family == PF_INET6) { struct ipv6_pinfo *np = inet6_sk(sk); @@ -311,7 +312,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; tw->tw_tclass = np->tclass; tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK); - tw->tw_txhash = sk->sk_txhash; tw->tw_ipv6only = sk->sk_ipv6only; } #endif