> -----Original Message----- > From: Yigit, Ferruh <ferruh.yi...@intel.com> > Sent: Tuesday, March 23, 2021 1:24 AM > To: Thomas Monjalon <tho...@monjalon.net>; Zhang, Qi Z > <qi.z.zh...@intel.com>; Andrew Rybchenko <arybche...@solarflare.com> > Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.w...@intel.com>; Wu, Jingjing > <jingjing...@intel.com>; Xing, Beilei <beilei.x...@intel.com>; Guo, Jia > <jia....@intel.com>; Yang, Qiming <qiming.y...@intel.com>; Wang, Haiyue > <haiyue.w...@intel.com>; Richardson, Bruce <bruce.richard...@intel.com> > Subject: Re: [dpdk-dev] [PATCH v2 1/8] ether: refine debug compile option > > On 3/16/2021 4:37 PM, Ferruh Yigit wrote: > > On 3/16/2021 1:39 PM, Thomas Monjalon wrote: > >> 16/03/2021 14:05, Ferruh Yigit: > >>> On 3/12/2021 12:12 PM, Qi Zhang wrote: > >>>> PMDs use RTE_LIBRTE_<PMD_NAME>_DEBUG_RX|TX as compile 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 compile options for specific Rx/Tx data > >>>> path debug, so PMD can choose to reuse them to avoid maintain their > own. > >>>> > >>>> - RTE_LIBRTE_ETHDEV_DEBUG_RX > >>>> - RTE_LIBRTE_ETHDEV_DEBUG_TX > >>>> > >>>> Also, all the compile options are documented on the overview page, > >>>> so users can easily find them. > > > > <...> > > > >>>> + > >>>> +- ``RTE_LIBRTE_ETHDEV_DEBUG`` (default **disabled**) > >>>> + > >>>> + Compile with debug code on data path. > >> > >> What is data path if not Rx or Tx? > >> > >>>> + > >>>> +- ``RTE_LIBRTE_ETHDEV_DEBUG_RX`` (default **disabled**) > >>>> + > >>>> + Compile with debug code on Rx data path. > >>>> + > >>>> +- ``RTE_LIBRTE_ETHDEV_DEBUG_TX`` (default **disabled**) > >>>> + > >>>> + Compile with debug code on Tx data path. > >> > >> In general, I think "LIBRTE_" is redundant and useless as macro prefix. > >> > > > > > > 'RTE_LIBRTE_ETHDEV_DEBUG' already exits, it enables datapath debug > > without distinguishing Rx or Tx. > > > > When we have _RX and _TX macro variants now, it may be possible to > > 1- get rid of 'RTE_LIBRTE_ETHDEV_DEBUG' macro and continue with fine > > grained RX & TX > > 2- Use 'RTE_LIBRTE_ETHDEV_DEBUG' as an alias to enable both RX & TX > > 3- Keep 'RTE_LIBRTE_ETHDEV_DEBUG' for ethdev layer datapath debug, and > > RX & TX variants for PMDs. > > > > I think (3) can be more backward compatible, and can be helpful to > > separate ethdev layer and PMD debugging, but no so strong opinion. > > Hi Qi, > > Reminder of above discussion, it is not addressed in v4. What do you think > option 3 above?
As discussed with Ferruh, we are agree to take option 1), which means 1. RTE_ETHDEV_DEBUG will be removed, as user can use to use _RX, _TX directly. 2. Now alias RTE_LIBRTE_ETHDEV_DEBUG to RTE_ETHDEV_RX and RTE_ETHDEV_TX for backward compatibility. 3. we will not take option 2, because, is may cause different behavior when rte_ethdev.h is included a PMD source file or not. I will send V5 base on it, and let 's continued the discussion base on that if more inputs. Thanks Qi