From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27187A00C2; Wed, 28 Sep 2022 06:02:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFC544113C; Wed, 28 Sep 2022 06:02:49 +0200 (CEST) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by mails.dpdk.org (Postfix) with ESMTP id 6CB9941133 for ; Wed, 28 Sep 2022 06:02:48 +0200 (CEST) Received: by mail-qv1-f47.google.com with SMTP id s13so7437930qvq.10 for ; Tue, 27 Sep 2022 21:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=r7AmOvvUlO86OR8oobELP3SaNGj5hYGJx416ycJHTsw=; b=Er0ZmvmWjZrppuchocDQV4doPwq6h7TM7lxvvqAbgogzSRid6ZEDIC2SDpbAmq0a+W aG+vkor/9QRrLKl83qw2Cb3rmEGvuFLJCl9YDNO442VrWmTPULkv9gDBb2wP2Iq5dD+Q hDe5b7TObLMyGhZ/etJKCJpyxf48YNBaHHRLNlidTGp5LGnjs9lYh10Tr9PbgcfalNt5 L5ynjSdjR7wu1UHJLxZsRQBclMcnDq71mlY3i5dggqkevVq95Y6ohSuiDY7JDeJM6nIq 79iwF1h3flKtsbyk+UCX3JDwNPLxisOa+brroHN7IKvU0UpJVQd/oHUxCRJCHv2BvuIS w+6Q== 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; bh=r7AmOvvUlO86OR8oobELP3SaNGj5hYGJx416ycJHTsw=; b=Oey/0M00mtDhTVat34FD9CN+Jz6U1xdbEoGWWjrVn38bTTP/KrGpMHT5g7QtGeBiEg ykqF7U//CwhR0HXnK9ciZjCY0O83OJ5tj2EsiHbdion6amFrpTPsiPC1V3SSfzVRreVq wS4m/tmcZ1utUNoim71KK+yc+hrSk76uKlClJCi6+X1tCY9aoXfSgLQiDPkfUmm4FlSk rwLf9nSNKYT45896A8RiOlthmcRo8XsGNovqlH6TTzzjdRzFWyUK7ntS06kLchiDhgi8 dTmvcE6R0JPr5U8+vfwWhxr7i8+P7BL7xn/eyBBQhLnBdLdlN2WwAJuHixj0B1eHqR7N X9WQ== X-Gm-Message-State: ACrzQf0fruLeJIILu6+YZEVOwDVVKU30iyJottZwshZ+0Jgi8FMt2EQt L7+2EpRcm2nSYroeTHpatwDd6gQ7KJfSocYdQvk= X-Google-Smtp-Source: AMsMyM5lOeIt0l4EZsxqhDgSSaI1HLbcWu36Dsfx7b+OiA+IFWHPvE4yyKvFvGToeViT0c0eEkDGi4vNu8LRh2WnBHc= X-Received: by 2002:ad4:5bc1:0:b0:4ad:34b2:d29c with SMTP id t1-20020ad45bc1000000b004ad34b2d29cmr24143031qvt.21.1664337767778; Tue, 27 Sep 2022 21:02:47 -0700 (PDT) MIME-Version: 1.0 References: <20220804134430.6192-1-adwivedi@marvell.com> <20220804134430.6192-2-adwivedi@marvell.com> <4508c74a-3530-5c08-a824-c72dc327dadd@oktetlabs.ru> In-Reply-To: <4508c74a-3530-5c08-a824-c72dc327dadd@oktetlabs.ru> From: Jerin Jacob Date: Wed, 28 Sep 2022 09:32:21 +0530 Message-ID: Subject: Re: [EXT] Re: [PATCH 1/6] ethdev: add trace points To: Andrew Rybchenko Cc: Ankur Dwivedi , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "thomas@monjalon.net" , "mdr@ashroe.eu" , "orika@nvidia.com" , "ferruh.yigit@xilinx.com" , "chas3@att.com" , "humin29@huawei.com" , "linville@tuxdriver.com" , "ciara.loftus@intel.com" , "qi.z.zhang@intel.com" , "mw@semihalf.com" , "mk@semihalf.com" , "shaibran@amazon.com" , "evgenys@amazon.com" , "igorch@amazon.com" , "chandu@amd.com" , Igor Russkikh , "shepard.siegel@atomicrules.com" , "ed.czeck@atomicrules.com" , "john.miller@atomicrules.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "Maciej Czekaj [C]" , Shijith Thotton , Srisivasubramanian Srinivasan , Harman Kalra , "rahul.lakkireddy@chelsio.com" , "johndale@cisco.com" , "hyonkim@cisco.com" , "liudongdong3@huawei.com" , "yisen.zhuang@huawei.com" , "xuanziyang2@huawei.com" , "cloud.wangxiaoyun@huawei.com" , "zhouguoyang@huawei.com" , "simei.su@intel.com" , "wenjun1.wu@intel.com" , "qiming.yang@intel.com" , "Yuying.Zhang@intel.com" , "beilei.xing@intel.com" , "xiao.w.wang@intel.com" , "jingjing.wu@intel.com" , "junfeng.guo@intel.com" , "rosen.xu@intel.com" , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Liron Himi , "zr@semihalf.com" , Radha Chintakuntla , Veerasenareddy Burru , Sathesh B Edara , "matan@nvidia.com" , "viacheslavo@nvidia.com" , "sthemmin@microsoft.com" , "longli@microsoft.com" , "spinler@cesnet.cz" , "chaoyong.he@corigine.com" , "niklas.soderlund@corigine.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@oss.nxp.com" , "g.singh@nxp.com" , "apeksha.gupta@nxp.com" , "sachin.saxena@nxp.com" , "aboyer@pensando.io" , Rasesh Mody , Shahed Shaikh , Devendra Singh Rawat , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "jbehrens@vmware.com" , "maxime.coquelin@redhat.com" , "chenbo.xia@intel.com" , "steven.webster@windriver.com" , "matt.peters@windriver.com" , "bruce.richardson@intel.com" , "mtetsuyah@gmail.com" , "grive@u256.net" , "jasvinder.singh@intel.com" , "cristian.dumitrescu@intel.com" , "jgrajcia@cisco.com" Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > @Jerin, I'd like to know what do you think about my question/thoughts below @Andrew Rybchenko see below. > > On 9/13/22 10:18, Andrew Rybchenko wrote: > > On 9/13/22 09:48, Ankur Dwivedi wrote: > >> Hi Andrew, > >> > >>> -----Original Message----- > >>> From: Andrew Rybchenko > >>> Sent: Monday, September 12, 2022 4:30 PM > >>> To: Ankur Dwivedi ; dev@dpdk.org > >>> Cc: thomas@monjalon.net; mdr@ashroe.eu; orika@nvidia.com; > >>> ferruh.yigit@xilinx.com; chas3@att.com; humin29@huawei.com; > >>> linville@tuxdriver.com; ciara.loftus@intel.com; qi.z.zhang@intel.com; > >>> mw@semihalf.com; mk@semihalf.com; shaibran@amazon.com; > >>> evgenys@amazon.com; igorch@amazon.com; chandu@amd.com; Igor > >>> Russkikh ; shepard.siegel@atomicrules.com; > >>> ed.czeck@atomicrules.com; john.miller@atomicrules.com; > >>> ajit.khaparde@broadcom.com; somnath.kotur@broadcom.com; Jerin Jacob > >>> Kollanukkaran ; Maciej Czekaj [C] > >>> ; Shijith Thotton ; > >>> Srisivasubramanian Srinivasan ; Harman Kalra > >>> ; rahul.lakkireddy@chelsio.com; johndale@cisco.com; > >>> hyonkim@cisco.com; liudongdong3@huawei.com; > >>> yisen.zhuang@huawei.com; xuanziyang2@huawei.com; > >>> cloud.wangxiaoyun@huawei.com; zhouguoyang@huawei.com; > >>> simei.su@intel.com; wenjun1.wu@intel.com; qiming.yang@intel.com; > >>> Yuying.Zhang@intel.com; beilei.xing@intel.com; xiao.w.wang@intel.com; > >>> jingjing.wu@intel.com; junfeng.guo@intel.com; rosen.xu@intel.com; Nithin > >>> Kumar Dabilpuram ; Kiran Kumar Kokkilagadda > >>> ; Sunil Kumar Kori ; Satha > >>> Koteswara Rao Kottidi ; Liron Himi > >>> ; zr@semihalf.com; Radha Chintakuntla > >>> ; Veerasenareddy Burru ; > >>> Sathesh B Edara ; matan@nvidia.com; > >>> viacheslavo@nvidia.com; sthemmin@microsoft.com; longli@microsoft.com; > >>> spinler@cesnet.cz; chaoyong.he@corigine.com; > >>> niklas.soderlund@corigine.com; hemant.agrawal@nxp.com; > >>> sachin.saxena@oss.nxp.com; g.singh@nxp.com; apeksha.gupta@nxp.com; > >>> sachin.saxena@nxp.com; aboyer@pensando.io; Rasesh Mody > >>> ; Shahed Shaikh ; Devendra > >>> Singh Rawat ; jiawenwu@trustnetic.com; > >>> jianwang@trustnetic.com; jbehrens@vmware.com; > >>> maxime.coquelin@redhat.com; chenbo.xia@intel.com; > >>> steven.webster@windriver.com; matt.peters@windriver.com; > >>> bruce.richardson@intel.com; mtetsuyah@gmail.com; grive@u256.net; > >>> jasvinder.singh@intel.com; cristian.dumitrescu@intel.com; > >>> jgrajcia@cisco.com > >>> Subject: [EXT] Re: [PATCH 1/6] ethdev: add trace points > >>> > >>> External Email > >>> > >>> ---------------------------------------------------------------------- > >>> On 8/4/22 16:44, Ankur Dwivedi wrote: > >>>> Add trace points for ethdev functions. > >>>> > >>>> Signed-off-by: Ankur Dwivedi > >>>> --- > >>> > >>> [snip] > >>> > >>>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index > >>>> 1979dc0850..a6fb370b22 100644 > >>>> --- a/lib/ethdev/rte_ethdev.c > >>>> +++ b/lib/ethdev/rte_ethdev.c > >>> > >>> [snip] > >>> > >>>> @@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t > >>> owner_id) > >>>> > >>>> rte_spinlock_unlock(ð_dev_shared_data->ownership_lock); > >>>> > >>>> + rte_ethdev_trace_owner_delete(owner_id, ret); > >>> > >>> I'm wondering why trace is sometimes added in the middle of the > >>> function, > >>> but in the majority of cases it is added as the first or the last > >>> action. Is there > >>> any logical/guidelines behind it? > >> In this case for printing the return value the trace was added at the > >> end. I can change it if not required. > >> The logic which I used was to log at least the input arguments of a > >> function and in some cases also log important information(according to > >> me) if possible.For example in rte_eth_tx_buffer_count_callback() I > >> was also logging the count at the end. Similar logic in > >> rte_eth_link_get_nowait(). > >> Please let me know your views. > > > > The answer depends on purposes of tracing. I guess that the > > main goal is to understand what the application does. So, > > tracing without logging the result does not sound really > > useful. What's the point to see that application has tried > > to enable promiscuous mode without knowing the result if > > the attempt is successful or not? If failures are critical > > for the application functionality, hopefully it will > > result in error logging which could be used together with > > tracing to understand what happens. > > > > If so, it drives us to tracing nearby the end of the function > > when the function really has tried to do something. If there is > > no branching there we'll have some tracing of failures as well, > > but we definitely need to see the result in the trace point. Yes. It make sense to include the result. For example, rte_malloc etc we are already adding the result so the consumer of trace can get better view. > > > > I almost have no experience with tracing, so my thoughts > > could be wrong. > > Meanwhile I've updated the patch series as "Requested Changes" > since some fixes were promissed in v2.