From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [PATCH v2] net: Add trace events for all receive exit points Date: Mon, 12 Nov 2018 15:46:53 -0500 (EST) Message-ID: <1354786248.4048.1542055613213.JavaMail.zimbra@efficios.com> References: <20181112194405.4133-1-gbastien@versatic.net> <879033794.3997.1542053367213.JavaMail.zimbra@efficios.com> <2134979231.4006.1542054055701.JavaMail.zimbra@efficios.com> <20181112154035.56de5e23@vmware.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: =?utf-8?Q?Genevi=C3=A8ve?= Bastien , "David S. Miller" , netdev , Ingo Molnar To: rostedt Return-path: Received: from mail.efficios.com ([167.114.142.138]:36580 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbeKMGlt (ORCPT ); Tue, 13 Nov 2018 01:41:49 -0500 In-Reply-To: <20181112154035.56de5e23@vmware.local.home> Sender: netdev-owner@vger.kernel.org List-ID: ----- On Nov 12, 2018, at 3:40 PM, rostedt rostedt@goodmis.org wrote: > On Mon, 12 Nov 2018 15:20:55 -0500 (EST) > Mathieu Desnoyers wrote: > >> >> Hrm, looking at this again, I notice that there is a single DEFINE_EVENT >> using net_dev_template_simple. >> >> We could simply turn netif_receive_skb_list_exit into a TRACE_EVENT(), >> remove the net_dev_template_simple, and rename the net_dev_template_return >> to net_dev_template ? > > This too is only cosmetic and doesn't affect the code at all, because a > TRACE_EVENT() is really just: > > #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ > DECLARE_EVENT_CLASS(name, \ > PARAMS(proto), \ > PARAMS(args), \ > PARAMS(tstruct), \ > PARAMS(assign), \ > PARAMS(print)); \ > DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args)); > > -- Steve > Of course. I also notice that in two cases, a "gro_result_t" is implicitly cast to "int". I usually frown upon this kind of stuff, because it's asking for trouble if gro_result_t typedef to something else than "int" in the future. I would recommend going for two templates, one which takes a "int" ret parameter, and the other a "gro_result_t" ret parameter. Or am I being too cautious ? Thanks, Mathieu >> >> It's pretty clear from the prototype that it expects a "ret" argument, >> so I don't see the need to also state it in the template name. >> -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com