From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92BF6A0561; Mon, 20 Apr 2020 16:43:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D9121D63B; Mon, 20 Apr 2020 16:43:28 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id CCDB51D636 for ; Mon, 20 Apr 2020 16:43:26 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200420144325euoutp024d942890b7fce82770364e5bab3d786f~HjkGO-sZp1477514775euoutp02r; Mon, 20 Apr 2020 14:43:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200420144325euoutp024d942890b7fce82770364e5bab3d786f~HjkGO-sZp1477514775euoutp02r DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587393805; bh=/FDftq9W5VOgO7xCXZ4kJDuyBFTBghLXwJLMOMk5iZA=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=ii4kld3MCqoaZBqeL70E9EaTElrqE91AzJxL63lQeEirM5fglJIJzCRST1yeGHK1w +w6PMD1QAgXog0cusvlKMnhzPcVjYtkyvI+yGPYE2mACHkuf27nVJMUMSL63SaxtY9 GKLPPZ6KvNVQMFEmgKU2y1UKqTd/NX4oa7YNgx4I= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200420144325eucas1p1e0bb46254aafa6c5bc491102fde01c3d~HjkGHOx431762317623eucas1p1B; Mon, 20 Apr 2020 14:43:25 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id ED.A0.60698.D05BD9E5; Mon, 20 Apr 2020 15:43:25 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200420144325eucas1p226547e26cde0851c192094da5973ac14~HjkFxF6UG0723707237eucas1p2B; Mon, 20 Apr 2020 14:43:25 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200420144325eusmtrp1356501b35b313287eaaec24f14d38e21~HjkFvzzrq2157421574eusmtrp1v; Mon, 20 Apr 2020 14:43:25 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-6e-5e9db50d520d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F2.DA.08375.D05BD9E5; Mon, 20 Apr 2020 15:43:25 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200420144322eusmtip18ed72a49c1b0f1c24cff1980d88c5d4b~HjkDIPOJC2438924389eusmtip1q; Mon, 20 Apr 2020 14:43:22 +0000 (GMT) To: Bruce Richardson , "Ananyev, Konstantin" Cc: "Dumitrescu, Cristian" , Thomas Monjalon , Igor Russkikh , Pavel Belous , "Lu, Wenzhuo" , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , John Daley , Hyong Youb Kim , "Zhang, Qi Z" , "Wang, Xiao W" , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Wei Hu (Xavier)" , "Min Hu (Connor)" , Yisen Zhuang , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , Rasesh Mody , Shahed Shaikh , "Singh, Jasvinder" , Maxime Coquelin , "Wang, Zhihong" , "Ye, Xiaolong" , Yong Wang , "Yigit, Ferruh" , Andrew Rybchenko , Olivier Matz , "dev@dpdk.org" From: Lukasz Wojciechowski Message-ID: Date: Mon, 20 Apr 2020 16:43:21 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200420142134.GB1714@bricha3-MOBL.ger.corp.intel.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUxTZxTe6f3opbHkWnW8URezZmVuTtiCS07i5xa2XbNlcct+LGa6deMG ceXDXpG5xAW1U6gwtorWXjWtMATLPtBZFMZwFCwIM5MNBzMQayhfQkGLIAJjo72Y8e95nvOc c57z5uUonZ9dyqWk7RbNaUaTntXQlb5Hv6/Wek5vf7GufBX6C7tYPHLPosIO90YssYwD2m5n q3A4dEmFbX8M0tj5S4saLb47LHrv9wPmX22n8WSxncF/nSYMefvU6HCNAtZMNtE4Ml1Eoy+3 hsaSUDeFf/ZfZdBz4LwKR/PeRXtFAYuFVZcBhyqLKGy8dJbBkH+2y/PbP4DdXecAr/TVq3F6 6GWsO2ylsNjdwuLkd9/S+FOrTYXB3Fx60zNCa0EnCGU3rIxwvbSDEQqnzjPCpKuEESwNQUYo rhlQCUfPtFKC7+/jamGk9iYrDFzMEMoDE6ww7AyyW7RbNeuSRFPKHtEcv+EjzY5Q2zsZPgd8 dmCmlMmG4X1W4DjCryE37rxtBQ2n48uAyK5xViEPgPS4ZlQKGQVysN1NWSEq0pE79XCuUAqk oqp+jgSBjAwdpsOuRfw2ciLQHMGL+RQy1NukDpsofkBDms+61eECy68nDY4xJoy1/OvkttMe 0WneQIpsgxAOuGR2kP2v9xTLQnLNEYjMjOITif1aecRO8SvIQc9JSsEx5FbAGQlE+J+jSHVv 91zsRHLrwnFGwYvI3caLagUvJy1H82iloRLIzalHoJArQNrzy+Zca0n9zBQbTkTxz5Efq+MV +RWS31wHyktGk47gQiVENLFV2ilF1pKcQzrFHUd68o7B47XT3wfor0EvzztNnneOPO8c+f+9 LqDdECNmSqnJopSQJmbFScZUKTMtOe6T9NQLMPvvW2Yaxy5D7fTHXuA50C/Qvv/F6e06xrhH 2pvqBcJR+sXapHWzkjbJuPdz0Zz+oTnTJEpeWMbR+hhtQtHANh2fbNwtfiqKGaL5cVXFRS3N hg82rXxhvX9B9N1DYxPSm2/pnohtTzp2L/l+U1bsayttfSWW1qreh2O7tjRlnRpc1Va93/Yg veebmKd/8JSeYWu/in9Vjt/gX9Hse3bzGwU7G7zcqcQK06/Oxqc2do6vNVKxji45Qe5f3V3V aUi8fsRgmIjOaeip+XK/HQw5+GTHvs2ynpZ2GF96njJLxv8ADaGYJfMDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0xTZxiH851bD8SaY8XwpTFxNs5rLB4Q+uKK2+I0R//wRmKMiHgmZ4DS FntaJ1vYULs4igatRKBGi2AF0SWyWi8RttlpQXHD4g0vqAQyMdykzl24rhWX8N+T7/s9vzdv 8rKkaoBWs1lGi2Q2itkaJpJqGm1oW6j0Ht+yaKAoCl4UtzFQ+NpGQGvNx+C2/YXA8TyfgL7g JQLutXRT8LS+SQE2fzsDvoEuBAdvPKTgWGUJDWOubAj6XiqgrPwNgrrBRgr6hyso8BfUUeAO dpBwt+sGDd69tQS8ObAeSs4XMVB85TKCnosVJDRcOk1D8EXI8t4eQdDRdgbBzy9/VcBwTzxc 228nobKmiYHBc6co8AQcBPQWFFCfzBICRU+RUH3HTgu/VbXSQvFQLS0MlrtpwXa9lxYq614R wpGTAVLwPzqqEPp/us8Iry7kCGc7/2GEPlcvs1a5Sas3m6wW6YNMk2xJ0qTwEKvlE0EbuzhR y8fpUpfExmtilurTpeysXZI5ZulWbWbw3rocfxnavXe0is5HfXl2FMFibjEuGPqbsKNIVsW5 Ee7vKaXsiA19TMevW7jxzFQ8/MDOhFnFdSN8uCohzFO5VFzaeYsKcxSXhW8XBulwD8m9jcRO TyUaL/WSODj6OxFOMVwSvl72lg6zkluBn7tKFGGmuA9xhaMbhQdPC7XaAvPGI1PwzbLOdwMi uM9wyc2z7+Ikl4BPeNrJcZ6B93mPvedo/LjTRRxCKucE3TlBcU5QnBOUckTVoCjJKhsyDDKv lUWDbDVmaLeZDD+i0Lld9P/ruYxaapN9iGORZpJy4zfHt6hocZeca/AhzJKaKGW6PvSkTBdz v5LMpjSzNVuSfSg+tNthUj1tmyl0vEZLGh/P6yCR18Xp4hJAE638nru2WcVliBZphyTlSOb/ PYKNUOejPULSkWe6/vMbrLkzJ+UsN35EzGlNdn23Oy9RvbC5ee7OVZMLZ1p7JxfpnX9U7xj5 fLa4JMWhfvb1k9T2xjWlV/XRgb6d7CJSuuXIWP7D2J9xXaxn5dC5PQ3DkfvzxNUj0tinC/gv Yrrc29Nx0pfN3yY3njhU2rasuX6fM23F9l8C9dEaSs4U+fmkWRb/A66Qd1qEAwAA X-CMS-MailID: 20200420144325eucas1p226547e26cde0851c192094da5973ac14 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200417215759eucas1p1c0fcc3046d87dc9de1d15572ba6b7caa X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200417215759eucas1p1c0fcc3046d87dc9de1d15572ba6b7caa References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> <20200417215739.23180-4-l.wojciechow@partner.samsung.com> <20200420142134.GB1714@bricha3-MOBL.ger.corp.intel.com> Subject: Re: [dpdk-dev] [PATCH v1 03/17] ethdev: replace library debug flag with global one X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" W dniu 20.04.2020 o 16:21, Bruce Richardson pisze: > On Mon, Apr 20, 2020 at 01:37:12PM +0000, Ananyev, Konstantin wrote: >>> >>> >>>> -----Original Message----- >>>> From: Lukasz Wojciechowski >>>> Sent: Friday, April 17, 2020 10:57 PM >>>> To: Thomas Monjalon ; Igor Russkikh >>>> ; Pavel Belous ; >>>> Lu, Wenzhuo ; Marcin Wojtas >>>> ; Michal Krawczyk ; Guy Tzalik >>>> ; Evgeny Schemeilin ; Igor >>>> Chauskin ; John Daley ; Hyong >>>> Youb Kim ; Zhang, Qi Z ; >>>> Wang, Xiao W ; Ziyang Xuan >>>> ; Xiaoyun Wang >>>> ; Guoyang Zhou >>>> ; Wei Hu (Xavier) >>>> ; Min Hu (Connor) ; >>>> Yisen Zhuang ; Xing, Beilei >>>> ; Wu, Jingjing ; Yang, Qiming >>>> ; Ananyev, Konstantin >>>> ; Rasesh Mody ; >>>> Shahed Shaikh ; Singh, Jasvinder >>>> ; Dumitrescu, Cristian >>>> ; Maxime Coquelin >>>> ; Wang, Zhihong >>>> ; Ye, Xiaolong ; Yong >>>> Wang ; Yigit, Ferruh ; >>>> Andrew Rybchenko ; Olivier Matz >>>> >>>> Cc: dev@dpdk.org >>>> Subject: [PATCH v1 03/17] ethdev: replace library debug flag with global one >>>> >>>> Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_ETHDEV_DEBUG. >>>> The old define is completely removed from source code and config. >>>> The changes were applied also to all drivers using this flag. >>>> >>>> Signed-off-by: Lukasz Wojciechowski >>>> >>>> --- >>>> config/common_base | 1 - >>>> drivers/net/atlantic/atl_rxtx.c | 2 +- >>>> drivers/net/e1000/em_rxtx.c | 2 +- >>>> drivers/net/e1000/igb_rxtx.c | 2 +- >>>> drivers/net/ena/ena_ethdev.c | 2 +- >>>> drivers/net/enic/enic_rxtx.c | 2 +- >>>> drivers/net/fm10k/fm10k_rxtx.c | 2 +- >>>> drivers/net/hinic/hinic_pmd_tx.c | 2 +- >>>> drivers/net/hns3/hns3_rxtx.c | 2 +- >>>> drivers/net/i40e/i40e_rxtx.c | 2 +- >>>> drivers/net/iavf/iavf_rxtx.c | 2 +- >>>> drivers/net/ice/ice_rxtx.c | 2 +- >>>> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- >>>> drivers/net/qede/qede_rxtx.c | 4 ++-- >>>> drivers/net/softnic/rte_eth_softnic.c | 2 +- >>>> drivers/net/softnic/rte_eth_softnic_thread.c | 2 +- >>>> drivers/net/virtio/virtio_rxtx.c | 2 +- >>>> drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- >>>> lib/librte_ethdev/rte_ethdev.h | 16 ++++++++-------- >>>> lib/librte_net/rte_net.h | 4 ++-- >>>> 20 files changed, 28 insertions(+), 29 deletions(-) >>>> >>>> diff --git a/config/common_base b/config/common_base >>>> index c5be57f11..16a8f09b6 100644 >>>> --- a/config/common_base >>>> +++ b/config/common_base >>>> @@ -149,7 +149,6 @@ CONFIG_RTE_LIBRTE_KVARGS=y >>>> # Compile generic ethernet library >>>> # >>>> CONFIG_RTE_LIBRTE_ETHER=y >>>> -CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n >>>> CONFIG_RTE_MAX_ETHPORTS=32 >>>> CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 >>>> CONFIG_RTE_LIBRTE_IEEE1588=n >>>> diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c >>>> index 449ffd454..eae54df22 100644 >>>> --- a/drivers/net/atlantic/atl_rxtx.c >>>> +++ b/drivers/net/atlantic/atl_rxtx.c >>>> @@ -821,7 +821,7 @@ atl_prep_pkts(__rte_unused void *tx_queue, struct >>>> rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c >>>> index 49c53712a..c4083ff00 100644 >>>> --- a/drivers/net/e1000/em_rxtx.c >>>> +++ b/drivers/net/e1000/em_rxtx.c >>>> @@ -626,7 +626,7 @@ eth_em_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c >>>> index 684fa4ad8..6a78f26e6 100644 >>>> --- a/drivers/net/e1000/igb_rxtx.c >>>> +++ b/drivers/net/e1000/igb_rxtx.c >>>> @@ -641,7 +641,7 @@ eth_igb_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c >>>> index 665afee4f..b9855e91b 100644 >>>> --- a/drivers/net/ena/ena_ethdev.c >>>> +++ b/drivers/net/ena/ena_ethdev.c >>>> @@ -2145,7 +2145,7 @@ eth_ena_prep_pkts(void *tx_queue, struct >>>> rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c >>>> index 6a8718c08..c42d563b4 100644 >>>> --- a/drivers/net/enic/enic_rxtx.c >>>> +++ b/drivers/net/enic/enic_rxtx.c >>>> @@ -414,7 +414,7 @@ uint16_t enic_prep_pkts(void *tx_queue, struct >>>> rte_mbuf **tx_pkts, >>>> rte_errno = ENOTSUP; >>>> return i; >>>> } >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/fm10k/fm10k_rxtx.c >>>> b/drivers/net/fm10k/fm10k_rxtx.c >>>> index 4accaa2cd..43d773f08 100644 >>>> --- a/drivers/net/fm10k/fm10k_rxtx.c >>>> +++ b/drivers/net/fm10k/fm10k_rxtx.c >>>> @@ -710,7 +710,7 @@ fm10k_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/hinic/hinic_pmd_tx.c >>>> b/drivers/net/hinic/hinic_pmd_tx.c >>>> index 64ec2c119..41d5a25b6 100644 >>>> --- a/drivers/net/hinic/hinic_pmd_tx.c >>>> +++ b/drivers/net/hinic/hinic_pmd_tx.c >>>> @@ -804,7 +804,7 @@ hinic_tx_offload_pkt_prepare(struct rte_mbuf *m, >>>> !(ol_flags & PKT_TX_TUNNEL_VXLAN)) >>>> return -ENOTSUP; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> if (rte_validate_tx_offload(m) != 0) >>>> return -EINVAL; >>>> #endif >>>> diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c >>>> index ec6d19f58..45aa64b70 100644 >>>> --- a/drivers/net/hns3/hns3_rxtx.c >>>> +++ b/drivers/net/hns3/hns3_rxtx.c >>>> @@ -2296,7 +2296,7 @@ hns3_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c >>>> index 5e7c86ed8..282baf514 100644 >>>> --- a/drivers/net/i40e/i40e_rxtx.c >>>> +++ b/drivers/net/i40e/i40e_rxtx.c >>>> @@ -1499,7 +1499,7 @@ i40e_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c >>>> index 85d9a8e3b..8122d35be 100644 >>>> --- a/drivers/net/iavf/iavf_rxtx.c >>>> +++ b/drivers/net/iavf/iavf_rxtx.c >>>> @@ -1689,7 +1689,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c >>>> index 1c9f31efd..fd8ed2573 100644 >>>> --- a/drivers/net/ice/ice_rxtx.c >>>> +++ b/drivers/net/ice/ice_rxtx.c >>>> @@ -3037,7 +3037,7 @@ ice_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c >>>> index 2e20e18c7..6964c4e52 100644 >>>> --- a/drivers/net/ixgbe/ixgbe_rxtx.c >>>> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c >>>> @@ -992,7 +992,7 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf >>>> **tx_pkts, uint16_t nb_pkts) >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c >>>> index b81788ca4..646eb2275 100644 >>>> --- a/drivers/net/qede/qede_rxtx.c >>>> +++ b/drivers/net/qede/qede_rxtx.c >>>> @@ -2156,7 +2156,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, >>>> struct rte_mbuf **tx_pkts, >>>> uint64_t ol_flags; >>>> struct rte_mbuf *m; >>>> uint16_t i; >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> int ret; >>>> #endif >>>> >>>> @@ -2196,7 +2196,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, >>>> struct rte_mbuf **tx_pkts, >>>> break; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/drivers/net/softnic/rte_eth_softnic.c >>>> b/drivers/net/softnic/rte_eth_softnic.c >>>> index 11723778f..b5b169ff7 100644 >>>> --- a/drivers/net/softnic/rte_eth_softnic.c >>>> +++ b/drivers/net/softnic/rte_eth_softnic.c >>>> @@ -704,7 +704,7 @@ rte_pmd_softnic_manage(uint16_t port_id) >>>> struct rte_eth_dev *dev = &rte_eth_devices[port_id]; >>>> struct pmd_internals *softnic; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); >>>> #endif >>>> >>>> diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c >>>> b/drivers/net/softnic/rte_eth_softnic_thread.c >>>> index d610b1617..2f7c3a838 100644 >>>> --- a/drivers/net/softnic/rte_eth_softnic_thread.c >>>> +++ b/drivers/net/softnic/rte_eth_softnic_thread.c >>>> @@ -3093,7 +3093,7 @@ rte_pmd_softnic_run(uint16_t port_id) >>>> { >>>> struct rte_eth_dev *dev = &rte_eth_devices[port_id]; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); >>>> #endif >>>> >>>> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c >>>> index 752faa0f6..02eaf38e3 100644 >>>> --- a/drivers/net/virtio/virtio_rxtx.c >>>> +++ b/drivers/net/virtio/virtio_rxtx.c >>>> @@ -1979,7 +1979,7 @@ virtio_xmit_pkts_prepare(void *tx_queue >>>> __rte_unused, struct rte_mbuf **tx_pkts, >>>> for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) { >>>> struct rte_mbuf *m = tx_pkts[nb_tx]; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> error = rte_validate_tx_offload(m); >>>> if (unlikely(error)) { >>>> rte_errno = -error; >>>> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c >>>> b/drivers/net/vmxnet3/vmxnet3_rxtx.c >>>> index dd99684be..a801290ff 100644 >>>> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c >>>> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c >>>> @@ -373,7 +373,7 @@ vmxnet3_prep_pkts(__rte_unused void *tx_queue, >>>> struct rte_mbuf **tx_pkts, >>>> return i; >>>> } >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> ret = rte_validate_tx_offload(m); >>>> if (ret != 0) { >>>> rte_errno = -ret; >>>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h >>>> index e9e3a1699..f314b57c7 100644 >>>> --- a/lib/librte_ethdev/rte_ethdev.h >>>> +++ b/lib/librte_ethdev/rte_ethdev.h >>>> @@ -4375,7 +4375,7 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t >>>> queue_id, >>>> struct rte_eth_dev *dev = &rte_eth_devices[port_id]; >>>> uint16_t nb_rx; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); >>>> RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0); >>>> >>>> @@ -4498,11 +4498,11 @@ rte_eth_rx_descriptor_status(uint16_t port_id, >>>> uint16_t queue_id, >>>> struct rte_eth_dev *dev; >>>> void *rxq; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>>> #endif >>>> dev = &rte_eth_devices[port_id]; >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> if (queue_id >= dev->data->nb_rx_queues) >>>> return -ENODEV; >>>> #endif >>>> @@ -4555,11 +4555,11 @@ static inline int >>>> rte_eth_tx_descriptor_status(uint16_t port_id, >>>> struct rte_eth_dev *dev; >>>> void *txq; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>>> #endif >>>> dev = &rte_eth_devices[port_id]; >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> if (queue_id >= dev->data->nb_tx_queues) >>>> return -ENODEV; >>>> #endif >>>> @@ -4641,7 +4641,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t >>>> queue_id, >>>> { >>>> struct rte_eth_dev *dev = &rte_eth_devices[port_id]; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); >>>> RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0); >>>> >>>> @@ -4727,7 +4727,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t >>>> queue_id, >>>> { >>>> struct rte_eth_dev *dev; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> if (!rte_eth_dev_is_valid_port(port_id)) { >>>> RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id); >>>> rte_errno = EINVAL; >>>> @@ -4737,7 +4737,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t >>>> queue_id, >>>> >>>> dev = &rte_eth_devices[port_id]; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> if (queue_id >= dev->data->nb_tx_queues) { >>>> RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", >>>> queue_id); >>>> rte_errno = EINVAL; >>>> diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h >>>> index 1560ecfa4..9a9732189 100644 >>>> --- a/lib/librte_net/rte_net.h >>>> +++ b/lib/librte_net/rte_net.h >>>> @@ -120,7 +120,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf >>>> *m, uint64_t ol_flags) >>>> struct rte_udp_hdr *udp_hdr; >>>> uint64_t inner_l3_offset = m->l2_len; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> /* >>>> * Does packet set any of available offloads? >>>> * Mainly it is required to avoid fragmented headers check if >>>> @@ -133,7 +133,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf >>>> *m, uint64_t ol_flags) >>>> if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) >>>> inner_l3_offset += m->outer_l2_len + m->outer_l3_len; >>>> >>>> -#ifdef RTE_LIBRTE_ETHDEV_DEBUG >>>> +#ifdef RTE_DEBUG >>>> /* >>>> * Check if headers are fragmented. >>>> * The check could be less strict depending on which offloads are >>>> -- >>>> 2.17.1 >>> The approach in this series does not make any sense to me: what if you want to debug just this library instead of the entire DPDK? We need >>> to be able to enable debug for a single library at a time, as opposed to the user being flooded with unwanted debug messages from all the >>> libraries. >>> >>> NAK from me. >> I am agree with Cristian concern here: >> that patch removes ability to enable/disable debug on particular library/PMD. >> If the purpose is to minimize number of config compile options, >> I wonder can't it be done in a slightly different way: >> 1. introduce gloabal RTE_DEBUG >> 2. keep actual .[c,h] files intact >> 3. In actual librte_xxx/meson.build file check if RTE_DEBUG is enabled, >> If yes, then enable particular debug flag for these libs. >> Something like: >> If dpdk_conf.get('RTE_DEBUG') == true >> dpdk_conf.set('RTE_LIBRTE_XXX_DEBUG ', 1) >> >> defines that are used by multiple libs, probably can be >> set in upper layer meson.build. >> >> That way will have global 'debug' flag, but users will still >> have an ability to enable/disable debug flags on a per lib basis >> via CFLAGS="-D..." >> >> Konstantin >> > That seems a reasonable idea to me. > > However, in this case, we don't need the RTE_DEBUG flag at all, we can > either: > > * allow each component meson.build file define its own flags after checking > get_option('debug') > * have lib/meson.build and drivers/meson.build automatically define a > specific define for each library or driver to standardize the naming. > [This would save anyone working on it from having to lookup what the > define was, since it's always e.g. RTE_DEBUG_ + library-base-name, e.g. > RTE_DEBUG_LPM, RTE_DEBUG_SCHED etc] > > Theoretically we can also do both, have the standard ones defined and then > allow a component to provide extra flags itself if so desired. > > /Bruce OK, so let's summarize how the patches should be redo: * usage of global "debug" flag for meson build stays * we standardize names of debug flags in the components to RTE_DEBUG_ + components name * debug flag enables al the RTE_DEBUG_... flags This allow to easily use both: * the debug flag - to enable all debugs * or define manually RTE_DEBUG+component name, just for debug from a single component I like Bruce's idea of adding it to the lib/meson.build and drivers/meson.build. This way they will be added to dpdk_conf meson object and written then later to rte_build_config.h before compilation stage. All the other modules will be able to use these flags. If there are no objections for such solution,  I'll prepare v2 containing above changes. -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com