Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4398858rwl; Sat, 7 Jan 2023 17:52:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXtgnBAe6Q7pSkHUiYcQAJngxpaTDiPyKoJhx8UoJku75C8DuhnntMGl8ADivitwed3kYZeV X-Received: by 2002:a62:8449:0:b0:57c:2ab7:2c0b with SMTP id k70-20020a628449000000b0057c2ab72c0bmr78502756pfd.28.1673142750455; Sat, 07 Jan 2023 17:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673142750; cv=none; d=google.com; s=arc-20160816; b=pjWMxSD1m8KSm5JJEUQyKyPS2FjaOoGv/FcAImQREb7E71lGbzR7WwEXCmrfuaa+8/ 9WhwIbjpBOzvwgycFC2OV10YXCrbAb7WIjOhSt7OY4owhsSsu85PVwK2m4Rw+cYKHg6c V9drP3AJ/fFJfmT9mmcOZULVgsKqw3h/z7msDGGZuOMfVaEpg9YnTY+WKgbEgFWLOW/q SU4YypHp4w5j/kZBNvrYGjyZVbBpxy8SVPv46sH0t19VmCuh1FfeiONAcV8z4o51X9CY W1qPM+hWe9TFpI+8zH07qaOearVEVyjTL/8p5QUysBr2dZ6MEaWAxs08k7iyK0o0rDHK bWQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nt8bf7yY2IA0nhwlnQJ7DuxvVX3dIEzslwGHOn83FJo=; b=CY7/0k4HlHeJj+nMrtrEscGRK//pgDk8+EnQYnyzsqBnXNHfYI6HRhHe3cTy425YjP DTcPBIfNnKLUMMhg/A4onI6ZDatwGf3EDm4wGiITOpRvl9GvkOxqxQOE3fVOuZZ/cXIA O08bs8OB7mqpWKDj/X+ijxU9gF3gFxAJglF7ITO3GsQBXOquzlDu9TzDu4IntZByntJK HZgaJ/TjbLj+3+UX9lFaTbmWD7IVIcndXv23l1eIj782uMkfvvkzUdICWX8xkTGFTQ27 rVkQL4hY1Y35D2RvRQ1rjT74tx+ZpqRjkJJjUVIug1KwVtzsPbmuQ0uHtgnL47Bsw9jk 8MCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=CS2UnOpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i186-20020a6287c3000000b00574f3820920si5665293pfe.331.2023.01.07.17.52.23; Sat, 07 Jan 2023 17:52:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=CS2UnOpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231467AbjAHBfJ (ORCPT + 55 others); Sat, 7 Jan 2023 20:35:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjAHBfH (ORCPT ); Sat, 7 Jan 2023 20:35:07 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35D2F37246 for ; Sat, 7 Jan 2023 17:34:43 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id g10so3733224wmo.1 for ; Sat, 07 Jan 2023 17:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nt8bf7yY2IA0nhwlnQJ7DuxvVX3dIEzslwGHOn83FJo=; b=CS2UnOpOHf41jr69bJneaWCGkc8bk32YP0s5iK4rEO0z+NR20cpaMGNGx+ftFR4c8e Y1dVMxrTUwLMLPZrDukwtYMsE+Shzn9eMPEYDe+cD5BmLzxV3NICUI36LHwOsn1hX3DK +2OJic1oF4odTJ15gsbB7TfvacN8oX1iwnAaBFpcn9zbP/FtnpqoftUQ4FRr1kxJrCdX JhdgyNpPGxD/6xGFcWcjSP+hmEH8tNJXXXLAN/BqBiLIGRZ8Kk/gG/8izubxx35IecE/ N0rwdUiysbBAm2oj858eukW2Ala14qlJ+n0WspOsqKtk0/8S9PSzyvKMaYFSM2GVFJzW rXoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nt8bf7yY2IA0nhwlnQJ7DuxvVX3dIEzslwGHOn83FJo=; b=zwPHyVXnRwHNBa6lc1iW1pqlkebqhdUPi7E+rF2qW523SJzyJlTK7RvvIAw1pRdyDb bAovYG0TSc+QApCVoYB7jznGf9WIjpjOP+zjeV6mDsiMDtlfiXtbtAntgrUskPoN3AAs kz6KEy8KcZAuOM1kF5pZENTjzslwteJ8RCFlkxtIijTaU0fgUz7uL91Aamt8FJwsJw4s KVCH52JkWoWkZ3Kqa/PzGL5ol7+THrhA/Nqg2hfbaKl6GG2jaSI3yNOnZshkWJpin3Aw t1CPYR5QUAHmuTXMf1mby8fkFBnAg3ltni1YQg/DiwNEdwDcwFBNB+wNBnTxoMxpjD1L KJqw== X-Gm-Message-State: AFqh2kpv+1btm7xixGYYA7r20ceja4ZAxDMNyw5Vbyp8+kbSTN87AN0X QmL7XyUJFnG1p78lEADODalopZ2H87ElMqIYnUNAOA== X-Received: by 2002:a7b:c5d6:0:b0:3cf:70a0:f689 with SMTP id n22-20020a7bc5d6000000b003cf70a0f689mr2997475wmk.161.1673141681640; Sat, 07 Jan 2023 17:34:41 -0800 (PST) MIME-Version: 1.0 References: <20230107035923.363-1-cuiyunhui@bytedance.com> In-Reply-To: From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Sun, 8 Jan 2023 09:34:30 +0800 Message-ID: Subject: Re: [External] Re: [PATCH v3] sock: add tracepoint for send recv length To: Cong Wang Cc: rostedt@goodmis.org, mhiramat@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, kuniyu@amazon.com, duanxiongchun@bytedance.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 8, 2023 at 4:03 AM Cong Wang wrote: > > Thanks for the numbers, they help a lot. > > Acked-by: Cong Wang > > A few minor issues below. Ok, Thanks for your suggestion, I'll update these on v4. > > + > > + TP_printk("sk address = %p, family = %s protocol = %s, length = %d, error = %d, flags = 0x%x", > > + __entry->sk, > > + show_family_name(__entry->family), > > + show_inet_protocol_name(__entry->protocol), > > + __entry->length, > > + __entry->error, __entry->flags) > > Please align and pack those parameters properly. OK, thanks. > > + > > +DEFINE_EVENT(sock_msg_length, sock_recvmsg_length, > > + TP_PROTO(struct sock *sk, __u16 family, __u16 protocol, int ret, > > + int flags), > > + > > + TP_ARGS(sk, family, protocol, ret, flags) > > +); > > It might be a better idea to remove "msg" from the tracepoint names, in > case of any confusion with "sendpage". So > s/sock_sendmsg_length/sock_send_length/ ? OK, I'll rename both to sock_send_length/sock_recv_length. > > - return INDIRECT_CALL_INET(sock->ops->recvmsg, inet6_recvmsg, > > + int ret = INDIRECT_CALL_INET(sock->ops->recvmsg, inet6_recvmsg, > > inet_recvmsg, sock, msg, msg_data_left(msg), > > flags); > > Please adjust the indentations properly. Roger that! Thanks, Yunhui