Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2944443imm; Thu, 24 May 2018 19:36:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPy4H3Ui4cz4sfYmH5NQuZ/emqw0g1hQ00rU8aKwl+n+N/aXWO7BDrkm/niG0H9ORAcVIu X-Received: by 2002:a65:640d:: with SMTP id a13-v6mr477501pgv.154.1527215787132; Thu, 24 May 2018 19:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215787; cv=none; d=google.com; s=arc-20160816; b=OYdbtI7FoJ9p0XM0kV/I3G3GjnKaFC8oSi5jt8eguL4pdGH/zz+I3cS+p3/vmgi4dA hiVbsQSgv6GgrnGiK7Dw6a3HmUGiOh+w5pDoN6dHd12pNi2KNLLVdqPRqhrUaRCjK8jD i+0+YxloKGsczKWTOfTusPjEKDFELZgvv0+piK1PY/jIN/d2O43B/7quzV1SQYDzDLA2 ZyHkmPVlwODkVNxicGDS/ahzUF3qAxMBX810flS+6F2WIqIUI8sydQ4u9wOl7SywfNfK fG2UFys/WmhQ3eCDxB5zLkYcHHlqUywQjbpE/5gM8wHScWpjbB+TkZcMlxPuqL4BRhk9 6GIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature:arc-authentication-results; bh=AlEQYUl9eza/gqV7A2rlxMPuuEHyPOPip4Q2mvSD+dk=; b=rWlOtHxtLvdFZiLUqmFRky902YVnNM2E+Iju2strpSSxy3PsSKWIKcQnYykiWU89Bh /reysQE8Q9TQlfJbe008FefP56wNen8rQ7/rMiuOj0/Ye799zPo0xemMuhhi6r6DxVEE e+VS5aybf58q/NlPU57JVkohMpKl+r3Q9PsCBMSg1qgqJBSpS73FTpzMKtgMyBscBzVA JNpDFuYLluT51zoMY3Bdu6oRKVcQbnUd5mZVpJNb8iT65ZRbG20zPlM4h1Nicvba3VDa /ksbq45jwoTq3cN2YpF9LTiJoLXs2D5ykKbmZcZqnyPZSrVA3D0J8NWiLZ6ocfNzowXH zH0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=pdqnbb++; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=YGwhCPm/; 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=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si21352756plk.191.2018.05.24.19.36.12; Thu, 24 May 2018 19:36:27 -0700 (PDT) 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=@fb.com header.s=facebook header.b=pdqnbb++; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=YGwhCPm/; 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=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030845AbeEXRpA (ORCPT + 99 others); Thu, 24 May 2018 13:45:00 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51510 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030394AbeEXRoy (ORCPT ); Thu, 24 May 2018 13:44:54 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4OHhn5w013252; Thu, 24 May 2018 10:44:50 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=AlEQYUl9eza/gqV7A2rlxMPuuEHyPOPip4Q2mvSD+dk=; b=pdqnbb++o3lYTx/kNKJ8XvKbSOejJ49/eYrXJC3blVSW7eBD+87aXO/LrX82xWoDv5hc J3jftNJTtqATGOVHa95MyfpIaV/xzaUyKbGlWe+T90yZMbK5PzBa7qDD9XxJQzeICGoA P2ophRDCJl6NtVCpcLvWTN79HietKyVaLVY= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2j61y680n6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 May 2018 10:44:49 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.32) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 24 May 2018 13:44:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AlEQYUl9eza/gqV7A2rlxMPuuEHyPOPip4Q2mvSD+dk=; b=YGwhCPm/fCxIsRqIy19jzowuMfu+m/TBLu1H1MbBpuLCURGf05Ztio4ACd0+DbgqqUc8t4HfYOxcTrlwhbpHGbl3dAIcs4PbIjqaflL00UIva3exXu2LDgpNq4wuUyw9abuSEKeo1gS3/a6xqEwqWWRDi4ACHgaEX5KwWKN8DMg= Received: from DM5PR15MB1548.namprd15.prod.outlook.com (10.173.222.139) by DM5PR15MB1259.namprd15.prod.outlook.com (10.173.209.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 24 May 2018 17:44:46 +0000 Received: from DM5PR15MB1548.namprd15.prod.outlook.com ([fe80::3484:7bb6:35dd:1fb2]) by DM5PR15MB1548.namprd15.prod.outlook.com ([fe80::3484:7bb6:35dd:1fb2%18]) with mapi id 15.20.0797.011; Thu, 24 May 2018 17:44:46 +0000 From: Song Liu To: Yafang Shao CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next] tcp: use data length instead of skb->len in tcp_probe Thread-Topic: [PATCH net-next] tcp: use data length instead of skb->len in tcp_probe Thread-Index: AQHT812Y4wWR4KLb5kOT+YUBetOrY6Q/JxKA Date: Thu, 24 May 2018 17:44:46 +0000 Message-ID: <630ED9AE-A932-4B6A-8236-D133CE3E0726@fb.com> References: <1527166097-10908-1-git-send-email-laoar.shao@gmail.com> In-Reply-To: <1527166097-10908-1-git-send-email-laoar.shao@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3445.6.18) x-originating-ip: [2620:10d:c090:200::5:2027] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR15MB1259;7:LmD2Nh4M1Ja3s30GDsCXuKAtq4K0S6vMkUUBR7wKgP1LcRH04wXJj+OPvfmyl8OSqFPTwWLzsAV7CZKmgV3nrHOtuRlH9upD8/1R3CbAuwG/V03Izxq2AzvyVQQ+ad1HwFAItd6Ml5oFvKN6BYXxbRp9OLP92+i2MJyVR20Vn2HdLVm5oOjfDsR6FCE2Xz2NEMFFCDlStK0PdFfUMo27gI9LN/T+HT2uy+Rn6ZvIrIQWB74OAM9wNp47tfUdzO1T;20:vc7c1UcqsQD2GdyXIkJfjxFWn9zPSadnNH7FgDan/YWT7nW+GpN//HobkQd+9/YmgxnEHzWBq+acTVliFz0xkVf9R5Lra5MwsJADnqteUurBmCYl0wFob9oIN5Ez8F+CQFND6uVXe56CYAc+TiruKB3bJ8eEucS6rDAPH7hgNCs= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DM5PR15MB1259; x-ms-traffictypediagnostic: DM5PR15MB1259: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(11241501184)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM5PR15MB1259;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1259; x-forefront-prvs: 0682FC00E8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009001)(6009001)(428001)(377454003)(164054003)(51704005)(24454002)(199002)(189002)(20776003)(69226001)(63696002)(74876001)(62966002)(74706001)(36756003)(33656001)(77096001)(77156001)(76786001)(76796001)(81542001)(93136001)(92566001)(46102001)(64706001)(82746002)(81342001)(92726001)(77982001)(59766001)(56816005)(80022001)(76482001)(90146001)(89996001)(65816001)(83716003)(87936001)(57306001)(56776001)(88136002)(54316002)(74366001)(44376005)(87286001)(87266001)(2656002)(50226001)(4396001)(47976001)(50986001)(95666003)(49866001)(47736001)(51856001)(85306002)(79102001)(85852003)(83072002)(21056001)(97336001)(94946001)(93516002)(95416001)(94316002)(86362001)(97186001)(80976001)(93916002)(81686001)(83322001)(19580405001)(81816001)(31966008)(74662001)(19580395003)(53806001)(74502001)(47446002)(3826001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR15MB1259;H:DM5PR15MB1548.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: mt+WQ4zsgg7REu9m4IKEXC5C3EnmKQH1VzvamY45rwpAjFxei9kMWFUyTrDIeukKK/GTFFvZOshaMpUH6rmHUAbg2h5oYqGANV2R+Rycwa1uuXPuUjuwX+Ty1FfQyKximSkMaVT7ScrE9q2I6K+/By7a3BYpIL+eVFJVh7AbzBFyUCzWVlQ8topfbZEDfifK spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <3A8CD1A8C7A51E4E93F481897EB3E911@namprd15.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 68df6bf9-b4b6-4f7b-c196-08d5c19e0a4d X-MS-Exchange-CrossTenant-Network-Message-Id: 68df6bf9-b4b6-4f7b-c196-08d5c19e0a4d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2018 17:44:46.2502 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1259 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-24_06:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 24, 2018, at 5:48 AM, Yafang Shao wrote: >=20 > skb->len is meaningless to user. > data length could be more helpful, with which we can easily filter out > the packet without payload. >=20 > Signed-off-by: Yafang Shao > --- > include/trace/events/tcp.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h > index c1a5284..259b991 100644 > --- a/include/trace/events/tcp.h > +++ b/include/trace/events/tcp.h > @@ -261,7 +261,7 @@ > __entry->dport =3D ntohs(inet->inet_dport); > __entry->mark =3D skb->mark; >=20 > - __entry->length =3D skb->len; > + __entry->length =3D skb->len - tcp_hdrlen(skb); We should also rename __entry->length to __entry->data_len, so that whoever using this field will notice the change.=20 Thanks, Song > __entry->snd_nxt =3D tp->snd_nxt; > __entry->snd_una =3D tp->snd_una; > __entry->snd_cwnd =3D tp->snd_cwnd; > @@ -272,7 +272,7 @@ > __entry->sock_cookie =3D sock_gen_cookie(sk); > ), >=20 > - TP_printk("src=3D%pISpc dest=3D%pISpc mark=3D%#x length=3D%d snd_nxt=3D= %#x snd_una=3D%#x snd_cwnd=3D%u ssthresh=3D%u snd_wnd=3D%u srtt=3D%u rcv_wn= d=3D%u sock_cookie=3D%llx", > + TP_printk("src=3D%pISpc dest=3D%pISpc mark=3D%#x data_len=3D%d snd_nxt= =3D%#x snd_una=3D%#x snd_cwnd=3D%u ssthresh=3D%u snd_wnd=3D%u srtt=3D%u rcv= _wnd=3D%u sock_cookie=3D%llx", > __entry->saddr, __entry->daddr, __entry->mark, > __entry->length, __entry->snd_nxt, __entry->snd_una, > __entry->snd_cwnd, __entry->ssthresh, __entry->snd_wnd, > --=20 > 1.8.3.1 >=20