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 2102CA0548; Thu, 1 Apr 2021 16:31:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9133D14135D; Thu, 1 Apr 2021 16:31:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id F23FD141354 for ; Thu, 1 Apr 2021 16:31:02 +0200 (CEST) IronPort-SDR: TfE6BV/szM8ydCpScgLfhr1RR0TxQiG8bwN3hOXENX5BZbZHY2Y3RpZaLjrddpD7ieyZmsozJn ciDTOQGIhiuw== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="172285196" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="172285196" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 07:31:01 -0700 IronPort-SDR: Hz2zacc3u5PE+qxwKKG1rss1/uCQa13OYMslwGNaROcT8pOmUZl2Z6XJ4UToWi5sU1utdOnPjX I4cDPt1if4Ig== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="456006086" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.201.245]) ([10.213.201.245]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 07:30:55 -0700 To: Shahed Shaikh , Rasesh Mody , Devendra Singh Rawat , Igor Russkikh , Maxime Coquelin , Chenbo Xia , Stephen Hemminger , Long Li , Steven Webster , Matt Peters , Jerin Jacob , Maciej Czekaj , Yong Wang , Heinrich Kuhn , Shijith Thotton , Srisivasubramanian Srinivasan , Jiawen Wu , Jian Wang , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin Cc: dev@dpdk.org, thomas@monjalon.net, bruce.richardson@intel.com, Qi Zhang , Thomas Monjalon , Andrew Rybchenko References: <20210310121626.2019863-1-qi.z.zhang@intel.com> <20210331095254.2454439-1-qi.z.zhang@intel.com> <20210331095254.2454439-2-qi.z.zhang@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <27cbb27b-42c9-9a6d-c990-c2174ec59e83@intel.com> Date: Thu, 1 Apr 2021 15:30:52 +0100 MIME-Version: 1.0 In-Reply-To: <20210331095254.2454439-2-qi.z.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v6 1/8] ether: refine debug build option 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 Sender: "dev" On 3/31/2021 10:52 AM, Qi Zhang wrote: > PMDs use RTE_LIBRTE__DEBUG_RX|TX as build option to wrap > data path debug code. As .config has been removed since the meson build, > It is not friendly for new DPDK users to notice those debug options. > > The patch introduces below build options for data path debug, so PMD > can choose to reuse them to avoid maintain their own. > > - RTE_ETHDEV_DEBUG_RX > - RTE_ETHDEV_DEBUG_TX > > All the build options are documented at programming guide > "3.1 Driver Option", so users can easily find them. > > The original undocumented RTE_LIBRTE_ETHDEV_DEBUG will alias to > both RTE_ETHDEV_DEBUG_RX and RTE_ETHDEV_DEBUG_TX for backward > compatibility. > > Signed-off-by: Qi Zhang > --- > doc/guides/nics/build_and_test.rst | 16 ++++++++++++++++ > lib/librte_ethdev/rte_ethdev.h | 22 ++++++++++++++-------- > 2 files changed, 30 insertions(+), 8 deletions(-) > > diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst > index e83dd4628c..e8b29c2277 100644 > --- a/doc/guides/nics/build_and_test.rst > +++ b/doc/guides/nics/build_and_test.rst > @@ -26,6 +26,22 @@ This will also build testpmd. > Detailed instructions are available > in the :doc:`meson build guide <../prog_guide/build-sdk-meson>`. > > +The ethdev layer supports below build options for debug purpose: > + > +- ``RTE_ETHDEV_DEBUG_RX`` (default **disabled**) > + > + Build with debug code on Rx path. > + > +- ``RTE_ETHDEV_DEBUG_TX`` (default **disabled**) > + > + Build with debug code on Tx path. > + > +.. Note:: > + > + The ethdev library use above options to wrap debug code to trace invalid parameters > + on data path APIs, so performance downgrade is expected when enabling those options. > + Each PMD can decide to reuse them to wrap their own debug code in the Rx/Tx path. > + Following drivers are other users of the PMD specific compile flag for the Rx/Tx datapath debug logs [1], maintainers of those PMDs cc'ed, can you please plan switching to the RTE_ETHDEV_DEBUG_RX / RTE_ETHDEV_DEBUG_TX macros? [1]: - bnx2x: RTE_LIBRTE_BNX2X_DEBUG_RX / RTE_LIBRTE_BNX2X_DEBUG_TX - qede: RTE_LIBRTE_QEDE_DEBUG_RX / RTE_LIBRTE_QEDE_DEBUG_TX - virtio: RTE_LIBRTE_VIRTIO_DEBUG_RX / RTE_LIBRTE_VIRTIO_DEBUG_TX - netvsc: RTE_LIBRTE_NETVSC_DEBUG_RX / RTE_LIBRTE_NETVSC_DEBUG_TX - avp: RTE_LIBRTE_AVP_DEBUG_RX / RTE_LIBRTE_AVP_DEBUG_TX - thunderx: RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX / RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX - vmxnet3: RTE_LIBRTE_VMXNET3_DEBUG_RX / RTE_LIBRTE_VMXNET3_DEBUG_TX - nfp: RTE_LIBRTE_NFP_NET_DEBUG_RX / RTE_LIBRTE_NFP_NET_DEBUG_TX - liquidio: RTE_LIBRTE_LIO_DEBUG_RX / RTE_LIBRTE_LIO_DEBUG_TX - txgbe: RTE_LIBRTE_TXGBE_DEBUG_RX / RTE_LIBRTE_TXGBE_DEBUG_TX - ena: RTE_LIBRTE_ENA_DEBUG_RX / RTE_LIBRTE_ENA_DEBUG_TX