Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp15529imm; Fri, 25 May 2018 15:03:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrs96JPweZpdkcw+g7SIH4ibAsveD7Q8MHwcpiL9fiTfZMDYENJAxPqR65qmnlxA6lX3rin X-Received: by 2002:a62:ac14:: with SMTP id v20-v6mr4266348pfe.101.1527285803327; Fri, 25 May 2018 15:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527285803; cv=none; d=google.com; s=arc-20160816; b=ZqKlVStAirawNbUPYyYMxkkwtyjy7mvCluyIRKDWDAOaQPe7bNrMNUP2cl4+KkJQrw mVXjNlhjiUMoJQVBsA/5JB4ZPcXRNSl/5h01c5gpMyX3/8JyUSZ5W1RosbnjDDVqLXGc ybtTp6k1MnWGs/nH3o3BRrVlmFp/uJ1PMIMFcipprikmF3hiVc0ouArg2hC8xanncSLe UmmTZf7X+e7Jd8ZJ849cqTt3Vfbg04/zrm0BcMy9B8BLQPhJ51bvRpyRqaQUOMslTk2+ ZLwFKpjV3bnY4OVPDyI+615T5wUjj9385RFZkvwKzkU1btUU+a9F1f0CKOR1fE7jBQ+9 ckiA== 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=qBGGOlE7ri29937MtvBKu3zCc6f+yBGUg9Tv5QLn+4k=; b=Znmq9tVwSchvmGi5xcNP+GhpIR7b7jp+xnAmh9Fsbz4w9zLRPgud8M0B09Dk9EbvJt 2UsLD2M0HsVCdyA5MvPUoqMMyYrhFlHGUjpIArfh0649KCPcTCnHsEE1Vuz4nJ3vEqvl rpSgKRGH02bJ4pouWoazPruwfDWePu/L/Kng25oDWl2iFJQJJmNbz0RvgRNIDKg68T0I XD6/NlIsUoleq/CmkYtAitDfTWS5wJbmVssw3WreperIgvXjJKZHsyYT7YbAy/qKVWof xtGPydf/xeWg49DudUpoHl4r0x+O7BJNmUqg/fpl3ZDE+FXy7+xORQdvVjeH9fmpPlTo X36A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=m7QKe4dv; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=QtKefLfS; 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 11-v6si24817579plc.466.2018.05.25.15.03.08; Fri, 25 May 2018 15:03:23 -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=m7QKe4dv; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=QtKefLfS; 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 S1030770AbeEYWCY (ORCPT + 99 others); Fri, 25 May 2018 18:02:24 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:44374 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030465AbeEYWCT (ORCPT ); Fri, 25 May 2018 18:02:19 -0400 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4PLtit3013070; Fri, 25 May 2018 15:02:17 -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=qBGGOlE7ri29937MtvBKu3zCc6f+yBGUg9Tv5QLn+4k=; b=m7QKe4dvh7xZYHcM0Gh/vVFo7XssAw6fTxd4n8OgE6Gu2KDs04W7y2nCUtc4sPwrTis3 7Qz5MmVZ1jpa9+wyeygKCmiYiR5JlLbyPu7bYzzyvcU/XoWH2AlKryT71tY8F8bC/tBj 2jJVaPqkX6Yxcv9uThuf6pHYsb8bkZAzN5A= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2j6sk6g6sx-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2018 15:02:16 -0700 Received: from PRN-CHUB02.TheFacebook.com (2620:10d:c081:35::11) by PRN-CHUB08.TheFacebook.com (2620:10d:c081:35::17) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 25 May 2018 15:01:52 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.12) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 25 May 2018 14:59:05 -0700 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=qBGGOlE7ri29937MtvBKu3zCc6f+yBGUg9Tv5QLn+4k=; b=QtKefLfSYqB8rcZtCdOk2eRHDfBUZeFlYFaP/ECo5FIDt8RBbtUS8OwNvt9/INhiLuR6+GAEHQfZEVfzcFecLemL1edHiVjqzshD4oc3ByZh2mUykwR2I1OMQ29mm7sZIpNyiUv1OO+xwzXBK1Uw3j3BAZymslKsyT4tz8YPIAA= Received: from MWHPR15MB1165.namprd15.prod.outlook.com (10.175.2.19) by MWHPR15MB1214.namprd15.prod.outlook.com (10.175.2.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Fri, 25 May 2018 21:59:02 +0000 Received: from MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::9485:7727:4b71:8cc0]) by MWHPR15MB1165.namprd15.prod.outlook.com ([fe80::9485:7727:4b71:8cc0%14]) with mapi id 15.20.0797.011; Fri, 25 May 2018 21:59:02 +0000 From: Song Liu To: Yafang Shao CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 net-next] tcp: use data length instead of skb->len in tcp_probe Thread-Topic: [PATCH v2 net-next] tcp: use data length instead of skb->len in tcp_probe Thread-Index: AQHT9BEzdsZVRYb1gUyc62SrUQVIhqRA/wqA Date: Fri, 25 May 2018 21:59:02 +0000 Message-ID: References: <1527243245-29582-1-git-send-email-laoar.shao@gmail.com> In-Reply-To: <1527243245-29582-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::7:1409] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR15MB1214;7:zzHoOnQcGZei2A20x1+pIArs8DBsYRX3sVfdx6NJsMtu80Zojmmgw3muqLR1qkcN6vzuRZrtsEpR04XOR0KWYX+mWFXKxbHi9uN0xAbALR5YlPo5NVEHRnAgbI4cBr0ScEs2cecJSZg/D2E/UQ6NJ7iqcEU/Rva0QmmND6C4OZaIQZ3n/jNiuGwzaeeMAoc47fwdlfVHx95StV1+5N2R6XD/yayEFIrihgXpsNYI80FpdcVWKI/HyjHA1EDQIAlq;20:9xxFKcTcBg3LsuaqIdND5pc/T0KxbOI9fde3dvXpc8Pv4ZGVwPFR2GjL/0Xwllz49Pi1AtDqaqaioNwbpTjw62t+O6nLTp+4ZgfNPoTM20+cpPDtPCoalVIAtiAkTCcads7XUXJo6SH6yNY3LzUyYEOfLpCxyS75zaTWNxXaX4A= 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:MWHPR15MB1214; x-ms-traffictypediagnostic: MWHPR15MB1214: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158)(67672495146484); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231254)(11241501184)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:MWHPR15MB1214;BCL:0;PCL:0;RULEID:;SRVR:MWHPR15MB1214; x-forefront-prvs: 06833C6A67 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(366004)(39380400002)(396003)(376002)(346002)(189003)(199004)(316002)(99286004)(54906003)(68736007)(7736002)(305945005)(102836004)(83716003)(6246003)(53936002)(5250100002)(39060400002)(4326008)(6916009)(36756003)(8936002)(81166006)(5660300001)(81156014)(86362001)(25786009)(50226002)(14454004)(8676002)(186003)(3280700002)(478600001)(3660700001)(53546011)(6506007)(2906002)(57306001)(76176011)(486006)(476003)(2616005)(11346002)(446003)(6116002)(229853002)(2900100001)(6486002)(46003)(6436002)(33656002)(105586002)(106356001)(6512007)(82746002)(97736004);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR15MB1214;H:MWHPR15MB1165.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: qd3l/+KdwVTw5UgDTwhNf11K2kvUlTMI7JAXIazF2Z0zlHsEEbsNIKQmuDGfhBwOXbYQ+JmcX1tghm9s8NC+qRWhBJm/Gio47YDWfadLV6UIhyUPQcy5sXbuXw/nAYezZ8xw5HJWVqXRDuDDI4FRrfPxHHNSMm+5upSBRUZECFZNTfqCGDPLXX+TYQg6vsGI spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 79eaa413-15ce-4c38-84ba-08d5c28aba20 X-MS-Exchange-CrossTenant-Network-Message-Id: 79eaa413-15ce-4c38-84ba-08d5c28aba20 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2018 21:59:02.4886 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1214 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-25_08:,, 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 25, 2018, at 3:14 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 Acked-by: Song Liu > --- > include/trace/events/tcp.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h > index c1a5284..703abb6 100644 > --- a/include/trace/events/tcp.h > +++ b/include/trace/events/tcp.h > @@ -236,7 +236,7 @@ > __field(__u16, sport) > __field(__u16, dport) > __field(__u32, mark) > - __field(__u16, length) > + __field(__u16, data_len) > __field(__u32, snd_nxt) > __field(__u32, snd_una) > __field(__u32, snd_cwnd) > @@ -261,7 +261,7 @@ > __entry->dport =3D ntohs(inet->inet_dport); > __entry->mark =3D skb->mark; >=20 > - __entry->length =3D skb->len; > + __entry->data_len =3D skb->len - tcp_hdrlen(skb); > __entry->snd_nxt =3D tp->snd_nxt; > __entry->snd_una =3D tp->snd_una; > __entry->snd_cwnd =3D tp->snd_cwnd; > @@ -272,9 +272,9 @@ > __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->data_len, __entry->snd_nxt, __entry->snd_una, > __entry->snd_cwnd, __entry->ssthresh, __entry->snd_wnd, > __entry->srtt, __entry->rcv_wnd, __entry->sock_cookie) > ); > --=20 > 1.8.3.1 >=20