Received: by 10.223.164.202 with SMTP id h10csp342920wrb; Thu, 9 Nov 2017 07:12:44 -0800 (PST) X-Google-Smtp-Source: ABhQp+Tc3cvqrxPywbSDPYTJw38E5omjGGa7sxBaRhKDB6t8uP+2Iss9rc5bKnN2K075PHg0GnfY X-Received: by 10.84.246.129 with SMTP id m1mr777510pll.130.1510240364702; Thu, 09 Nov 2017 07:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510240364; cv=none; d=google.com; s=arc-20160816; b=u+DQZtSY/3VWrvuzu7jQ9w3wSIeYlN7jbAfEXpkgHGau1blmoKAv4gTFey07b7Fw7A NTd8zGJh0GGRyShKeDaRP2/duXA2ttixcRW8BIx78pV/Y1P1C2/6crVxg6Fq4buLhHUK 0tMLac1dqLsQZKCgqoMxXIEC31Zg/IpWpX/Muzq0s/RYiPGsqMkBjfQycptuvYH4RWSz rxfK0/E6vi8Q5UknQu+2Un7BO/zj4P1EibaB+5JrcFmsXcj/6geIp53ixhp91Xan5Fnk 7AryziwNd2/l3MSqyLt5y4QzU5qjF2XM2mJBueQBBgNBaJ99nUiLr1CuVWlZEM8EldoD Tn9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=U3I31LwfvZnJLfQYiPrpXUGdshWA1B6eQNhmUjhcLOQ=; b=Lf/S1ummlIAC3YM6R2hwiwLmaP709beCwJT9BEwyo4aht7Zza0iu0x6obHNqhTUEC3 8LayV2saeGNL2EOjlkFcHjh5cf3Qfw6ruFzEYmB7Ld86A2o/Qt9VzY1u3YNTLZmgzQDs XuzXnERNDtpeGNKI+dm9vU38Oai19UG1NWeA2P6ZysFFxZNwHgQBbIiEctw0XuINIyoh sTKmCJZ2EgboOFs8D0iSYDarxLS0lS7QeZmKMmdk1MwlZeeCVtt5PumKU7ha976CjMhQ BcUl3fVDrrZHLrpLFsk4zuHwRmzAJkVmEhhMpHOPUXaQwy6VVw8YEUgcXx2LHCKPoDOr KrKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sNoEAKCv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si1352782pga.522.2017.11.09.07.12.33; Thu, 09 Nov 2017 07:12:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sNoEAKCv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827AbdKIPLR (ORCPT + 80 others); Thu, 9 Nov 2017 10:11:17 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:46991 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbdKIPLM (ORCPT ); Thu, 9 Nov 2017 10:11:12 -0500 Received: by mail-it0-f54.google.com with SMTP id f187so11648790itb.1; Thu, 09 Nov 2017 07:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U3I31LwfvZnJLfQYiPrpXUGdshWA1B6eQNhmUjhcLOQ=; b=sNoEAKCvWP0JjIFBAmUVxzP3kZk4ca9rYv1vmQ1VuxpKqx7cqBKW5Z2W1rUek58MG4 ez87KqYSR8Yubk1AtxwpbsfyPKYL4HL3uH6EWWY4YrGulkPxip4eZBsn/ZYroa6HjBuF GupaMjfN2bLjNoOBy4eb8Mg9vrfj3SL0i3HeIpviadsz7/A/Ek/pUnSpMTUIzicSVkix OAm3UAhbRcansPi42Zq2xDEwwbNONecFXMp0vJyHt0MlLjFP8bDgQnKhK02k27EQag3i NZ1aozx/M/+qU0dCWZ3K8gQzSalCbWRPi/z3xueKO9Yeja5r5M1+DuHFxY3PaczxdAE4 dJfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U3I31LwfvZnJLfQYiPrpXUGdshWA1B6eQNhmUjhcLOQ=; b=MgRcPL3ZATntKlx2SQh6jfMBWrzwBg2cjwUCuhTJwAvY8ya3CPLbI1+J7Ll7r68oJY OAUheRYEoekixhhPXrk9xBrkuswWNQH+HUgPokM7+NqTyGIq1OR43xUx2sSZpO2I9jR0 Yi0AjVfGAY2yRxd3sOMtnPsTgz62psx+B2aoKiEz8g6hsjE4k5wL9q+mFpamwjrjHxFC Vw40UZerNbP+kHNbiALVHUWl5XQX2jllRF685CpsjW0LhfCJE/eFn6LTjKYnjTBYYRvd yrmPrXEwF7X59paFcAPGqxCv2zoIJSVBaAqnvA2Wi0NYSaHkigba+CghKfCagwjDf5Sd DGeQ== X-Gm-Message-State: AJaThX5f438FlBnDTgkBL2JFnfWl0lWlMnppV8xQwoXmrxDelzIF45j7 g9eF1uReKWcj6AKnGjarrbgwqTWIVfWF3LJf+oI= X-Received: by 10.36.9.144 with SMTP id 138mr271770itm.106.1510240271492; Thu, 09 Nov 2017 07:11:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.160.73 with HTTP; Thu, 9 Nov 2017 07:11:10 -0800 (PST) In-Reply-To: <1510239528.2849.126.camel@edumazet-glaptop3.roam.corp.google.com> References: <1510237564-6013-1-git-send-email-laoar.shao@gmail.com> <1510237564-6013-2-git-send-email-laoar.shao@gmail.com> <1510239161.2849.123.camel@edumazet-glaptop3.roam.corp.google.com> <1510239528.2849.126.camel@edumazet-glaptop3.roam.corp.google.com> From: Yafang Shao Date: Thu, 9 Nov 2017 23:11:10 +0800 Message-ID: Subject: Re: [PATCH net-next 2/2] tcp: handle TCP_TIME_WAIT/TCP_NEW_SYN_RECV in tcp_set_state tracepoint To: Eric Dumazet Cc: David Miller , Alexey Kuznetsov , yoshfuji@linux-ipv6.org, rostedt@goodmis.org, mingo@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-09 22:58 GMT+08:00 Eric Dumazet : > On Thu, 2017-11-09 at 06:52 -0800, Eric Dumazet wrote: > >> Wow. >> >> >> Since all three variants of sockets (full sockets, request sockets, >> timewait sockets) are all hashed into ehash table these days, they all >> have the fields at the same offset >> >> For IPv4, that would be : >> >> __sk_common.skc_daddr (or inet_daddr) >> __sk_common.skc_rcv_saddr (or inet_rcv_saddr ) >> __sk_common.skc_dport (or inet_dport) >> __sk_common.skc_num (or inet_num) >> >> Look at __inet_lookup_established() and INET_MATCH() : They deal with >> the three variants, without having to look at sk_state. >> >> If you were using the fields that are common to all sockets, no need to >> add all this unnecessary complexity. >> > > Not to mention that your patch took care of IPv4 only. > > I can not say how sad I am that in 2017 IPv6 seems to be second class > citizen. > I'm also very sad that I'm still using IPv4 in 2017 : ( Okay then another issue, shoule we reduce the complexity in the function tcp4_seq_show() ? Thanks Yafang From 1583601040178704887@xxx Thu Nov 09 15:00:39 +0000 2017 X-GM-THRID: 1583598964747630187 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread