Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp94851pxj; Thu, 10 Jun 2021 15:56:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7AkEIU0vGzBPVYXRalPMR14DKMjWbagYl6Q6WOkawiuR91YbdUhMvaGiVbXpA0POzB4jx X-Received: by 2002:a17:907:1c20:: with SMTP id nc32mr690088ejc.21.1623365773862; Thu, 10 Jun 2021 15:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623365773; cv=none; d=google.com; s=arc-20160816; b=DrdaO/tl7xOX9OuYgUG4s+12WlnnWxjF5hkqIYUil9RB0Z639Z401noND2r5btwf2I MNHo48pdQv8HEcA/GR5oBsRc72YisORdrCQKjGpAiArvh3e34RQ4BZU4Y4shQXP/bJQ3 IgRPEMbgFPDtSNn4Y3fcjFeu7yESH655anPe+nq4Kc56Na6+qAfpqXBFVmLFBCF8UgAV W0BETJf4no2SUd1EgSgT+tVk9mur0nTz/JEu3S8R1NBAIF76vA2RIF1SUvKtuVp+3UIj /itqfiCjDGUsG5roua8lIzK+DlcI9KYwcTxpP/k5VdiK2cKwg9TBkESLWS++/s0bZOMP 1gmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MavhUkwec3KxpmIuIqa2ujWlt3bbQK3gmsqMev55N9g=; b=hFeVjNBOBov3uJWQXgyEaivVEpoiULHOHThUb0aPpBaY3aCnZUE3HOJBOC+z5qSQwt XzVovhuaE82J+eeTD8ad+prnHvs4NO6jEJSo5vUsD2+4RRC/4sw1/luuSUBzHYX7EW4t UkIlzD0B7Fu0tjECalE3IyW8DjDBUCb5qB1rdDfzmYUEtuRWDJ4XDMZfEw6PA9oHel23 XvUwEugZPSOB+YtpLkkan0Sk0hk0gk56U7RfRojblFFuTG3eo6AbrA98bPmiKoCD3Q7a vRW2HZCjkdbME+FUhhQiWndvypDoIQID1P9zbCr7Slh7o+2kJPF9C0fsshWLs4u0KLL9 AalQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.jp header.s=amazon201209 header.b=Uraga2nF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx16si3044892edb.291.2021.06.10.15.55.49; Thu, 10 Jun 2021 15:56:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.co.jp header.s=amazon201209 header.b=Uraga2nF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbhFJWzF (ORCPT + 99 others); Thu, 10 Jun 2021 18:55:05 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:6626 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhFJWzE (ORCPT ); Thu, 10 Jun 2021 18:55:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.co.jp; i=@amazon.co.jp; q=dns/txt; s=amazon201209; t=1623365587; x=1654901587; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MavhUkwec3KxpmIuIqa2ujWlt3bbQK3gmsqMev55N9g=; b=Uraga2nFfVs8uJU4qboinaI1G46RyK2lL+0NpxF4phJCQaBBLNY8PF8L KyYQ1zxQNOIUBhUdkqhDbZ8tvmamqmpTz8cxUkVGDAidAmUgPFgH5/BBr M/0IrNI2+S/wKkoboiujkdd3Kzby4DfsSXf7o6MmAAnBURHJhEhgZpGzH g=; X-IronPort-AV: E=Sophos;i="5.83,264,1616457600"; d="scan'208";a="115114206" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP; 10 Jun 2021 22:53:06 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com (Postfix) with ESMTPS id F15AFA25D0; Thu, 10 Jun 2021 22:53:03 +0000 (UTC) Received: from EX13D04ANC001.ant.amazon.com (10.43.157.89) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Jun 2021 22:53:03 +0000 Received: from 88665a182662.ant.amazon.com (10.43.160.41) by EX13D04ANC001.ant.amazon.com (10.43.157.89) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Jun 2021 22:52:58 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , , , , , , , Subject: Re: [PATCH v7 bpf-next 06/11] tcp: Migrate TCP_NEW_SYN_RECV requests at retransmitting SYN+ACKs. Date: Fri, 11 Jun 2021 07:52:55 +0900 Message-ID: <20210610225255.410-1-kuniyu@amazon.co.jp> X-Mailer: git-send-email 2.30.2 In-Reply-To: <3e02db84-1cda-8b5a-49ea-cdbad900e3ea@gmail.com> References: <3e02db84-1cda-8b5a-49ea-cdbad900e3ea@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.160.41] X-ClientProxiedBy: EX13D24UWA002.ant.amazon.com (10.43.160.200) To EX13D04ANC001.ant.amazon.com (10.43.157.89) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet Date: Thu, 10 Jun 2021 22:21:00 +0200 > On 5/21/21 8:20 PM, Kuniyuki Iwashima wrote: > > As with the preceding patch, this patch changes reqsk_timer_handler() to > > call reuseport_migrate_sock() and inet_reqsk_clone() to migrate in-flight > > requests at retransmitting SYN+ACKs. If we can select a new listener and > > clone the request, we resume setting the SYN+ACK timer for the new req. If > > we can set the timer, we call inet_ehash_insert() to unhash the old req and > > put the new req into ehash. > > > > ... > > > static void reqsk_migrate_reset(struct request_sock *req) > > { > > + req->saved_syn = NULL; > > + inet_rsk(req)->ireq_opt = NULL; > > #if IS_ENABLED(CONFIG_IPV6) > > - inet_rsk(req)->ipv6_opt = NULL; > > + inet_rsk(req)->pktopts = NULL; > > #endif > > } > > This is fragile. > > Maybe instead : > > #if IS_ENABLED(CONFIG_IPV6) > inet_rsk(req)->ipv6_opt = NULL; > inet_rsk(req)->pktopts = NULL; > #else > inet_rsk(req)->ireq_opt = NULL; > #endif I will fix this, thank you. Also I will send a follow-up patch later to fix the same style in inet_reqsk_alloc().